Skip to content

Bump org.springframework.boot:spring-boot-starter-parent from 3.1.1 to 3.1.2 #95

Bump org.springframework.boot:spring-boot-starter-parent from 3.1.1 to 3.1.2

Bump org.springframework.boot:spring-boot-starter-parent from 3.1.1 to 3.1.2 #95

# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions
name: Build and deploy JAR app to Azure Web App - payments-mg
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Java version
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache the Maven packages to speed up build
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Analyze with SonarCloud
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SPRING_DATASOURCE_URL: ${{ secrets.SPRING_DATASOURCE_URL }}
SPRING_DATASOURCE_USERNAME: ${{ secrets.SPRING_DATASOURCE_USERNAME }}
SPRING_DATASOURCE_PASSWORD: ${{ secrets.SPRING_DATASOURCE_PASSWORD }}
SPRING_SUPPORT_EMAIL: ${{ secrets.SPRING_SUPPORT_EMAIL }}
SPRING_MAIL_USERNAME: ${{ secrets.SPRING_MAIL_USERNAME }}
SPRING_MAIL_PASSWORD: ${{ secrets.SPRING_MAIL_PASSWORD }}
run: mvn -P tomcat org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} -Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.java.coveragePlugin=jacoco -Dsonar.jacoco.reportPaths='${{ github.workspace }}/target/jacoco.exec' -Dsonar.coverage.jacoco.xmlReportPaths='${{ github.workspace }}/target/site/jacoco/jacoco.xml' -Dsonar.verbose=true
- name: Build with Maven
run: mvn -P tomcat clean package -DskipTests
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
with:
name: package
path: '${{ github.workspace }}/target/*.war'
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: release
steps:
- name: Download a Build Artifact
uses: actions/download-artifact@v3
with:
name: package
path: '${{ github.workspace }}/target'
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: 'payments-mg'
slot-name: 'production'
publish-profile: ${{ secrets.AzureAppService_PublishProfile_27fdeef5e453441f8746fbf0c59e9692 }}
package: '${{ github.workspace }}/target/*.war'