Skip to content

Bump gradle/actions from 3 to 4 (#829) #32

Bump gradle/actions from 3 to 4 (#829)

Bump gradle/actions from 3 to 4 (#829) #32

name: Build and deploy
permissions:
id-token: write # Require write permission to Fetch an OIDC token.
on:
push:
branches: [ master ]
# Allow manually triggering deployment
workflow_dispatch:
jobs:
build:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew clean installDist
- name: Deploy
uses: mojira/deploy@main
with:
azure_client_id: ${{ secrets.AZURE_CLIENT_ID }}
azure_tenant_id: ${{ secrets.AZURE_TENANT_ID }}
azure_subscription_id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
bastion_name: ${{ secrets.BASTION_NAME }}
resource_group: ${{ secrets.RESOURCE_GROUP }}
resource_id: ${{ secrets.RESOURCE_ID }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
username: arisakt
artifact_paths: |
build/install/arisa-kt/lib
build/install/arisa-kt/bin
config/config.yml
artifact_destination: /home/arisakt/arisa-kt
script: |
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill
sleep 1
cd arisa-kt
/usr/bin/screen -d -m bash -c '/home/arisakt/arisa-kt/bin/arisa-kt; exec sh'