-
Notifications
You must be signed in to change notification settings - Fork 906
60 lines (53 loc) · 1.76 KB
/
build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build and deploy
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'liberica'
cache: 'maven'
- name: Cache Maven/Gradle repositories for tests
uses: actions/cache@v4
with:
path: /tmp/start-spring-io-cache
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: test-repositories-${{ runner.os }}-${{ github.run_id }}
restore-keys: test-repositories-${{ runner.os }}-
- name: Build with Maven
env:
START_SPRING_IO_TMPDIR: /tmp/start-spring-io-cache
run: ./mvnw --batch-mode --update-snapshots verify
- name: Set up Azure
uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d
with:
creds: ${{ secrets.AZURE_CREDENTIALS_SPRING_IO }}
- name: Set up Azure Spring Extension
run: az extension add --name spring
- name: Deploy
run: |
az spring app deploy \
--name start-spring-io \
--service spring-io \
--resource-group spring-io \
--artifact-path start-site/target/start-site-exec.jar
- name: Google Chat Notification
uses: Co-qn/google-chat-notification@3691ccf4763537d6e544bc6cdcccc1965799d056
with:
name: Build and Deploy
url: ${{ secrets.GOOGLE_CHAT_WEBHOOK }}
status: ${{ job.status }}
if: always()