Skip to content

Update azure-spring-apps.yml #4

Update azure-spring-apps.yml

Update azure-spring-apps.yml #4

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
create-new-deployment: true
use-staging-deployment: true
package: ${{ github.workspace }}/tortolla/presentation/*.jar
cpu: 0.25
memory: 512Mi
runtime-version: 17