Use GitHub Actions to build and deploy #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0 | |
with: | |
java-version: '17' | |
distribution: 'liberica' | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0 | |
- name: Build | |
run: ./gradlew build | |
- name: Set up Azure | |
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS_SPRING_TEAM }} | |
- name: Set up Azure Spring Extension | |
run: az extension add --name spring | |
- name: Deploy | |
run: | | |
az spring app deploy \ | |
--name issue-bot \ | |
--service spring-team \ | |
--resource-group spring-team \ | |
--artifact-path build/libs/issue-bot.jar |