-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.77 KB
/
azure-spring-apps.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
61
62
63
64
65
66
67
68
69
70
name: Build and Deploy to Azure Spring Apps
on:
push:
branches:
- master
paths:
- tortolla/**
- .github/workflows/azure-spring-apps.yml
pull_request:
branches:
- master
paths:
- tortolla/**
- .github/workflows/azure-spring-apps.yml
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'
- name: Build with Maven
run: mvn -f tortolla/pom.xml clean package
- name: Login via Azure CLI
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_SP_CREDS }}
# - name: Deploy
# uses: Azure/spring-apps-deploy@v1
# with:
# azure-subscription: ${{ secrets.AZURE_SUBSCRIPTION }}
# action: deploy
# service-name: tortolla-service
# app-name: tortolla
# use-staging-deployment: false
# deployment-name: default
# package: ${{ github.workspace }}/tortolla/presentation/target/*.jar
# cpu: 0.25
# memory: 512Mi
# runtime-version: 17
- name: Azure CLI Action to deploy
uses: Azure/cli@v2
with:
azcliversion: 2.64.0
inlineScript: |
az config set extension.dynamic_install_allow_preview=true
az spring app deploy \
--subscription ${{ secrets.AZURE_SUBSCRIPTION }}\
--resource-group tortolla\
--service tortolla-service\
--name tortolla\
--artifact-path ${{ github.workspace }}/tortolla/presentation/target/*.jar \
--runtime-version Java_17\
--build-cpu 250m\
--build-memory 512Mi