Skip to content

Commit 96ec9f5

Browse files
committed
Use GitHub Actions to build and deploy
1 parent 441e937 commit 96ec9f5

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Diff for: .github/workflows/build-and-deploy.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build and deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
name: Build and deploy
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
16+
with:
17+
java-version: '17'
18+
distribution: 'liberica'
19+
20+
- name: Set up Gradle
21+
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b # v4.3.0
22+
23+
- name: Build
24+
run: ./gradlew build
25+
26+
- name: Set up Azure
27+
uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0
28+
with:
29+
creds: ${{ secrets.AZURE_CREDENTIALS_SPRING_TEAM }}
30+
31+
- name: Set up Azure Spring Extension
32+
run: az extension add --name spring
33+
34+
- name: Deploy
35+
run: |
36+
az spring app deploy \
37+
--name issue-bot \
38+
--service spring-team \
39+
--resource-group spring-team \
40+
--artifact-path build/libs/issue-bot.jar

0 commit comments

Comments
 (0)