This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
Bump io.spring.initializr:initializr-bom from 0.13.0-SNAPSHOT to 0.20.1 #207
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B clean package --file pom.xml -P full | |
deploy_to_production: | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
name: Deploy to Azure Spring Apps | |
concurrency: staging_environment | |
env: | |
AZURE_SUBSCRIPTION: 799c12ba-353c-44a1-883d-84808ebb2216 | |
AZURE_SPRING_APPS: spring-initializr | |
AZURE_SPRING_APPS_APP: spring-initializr | |
if: ${{ github.repository == 'Azure/azure-spring-initializr' && github.event_name != 'pull_request' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
check-latest: false | |
cache: 'maven' | |
- name: Build with Maven | |
run: mvn -B clean install --file pom.xml -DskipTests | |
- name: Login via Azure CLI | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: deploy to production with artifact | |
uses: azure/spring-cloud-deploy@v1 | |
with: | |
azure-subscription: ${{ env.AZURE_SUBSCRIPTION }} | |
action: Deploy | |
service-name: ${{ env.AZURE_SPRING_APPS }} | |
app-name: ${{ env.AZURE_SPRING_APPS_APP }} | |
use-staging-deployment: false | |
package: ${{ github.workspace }}/start-site/target/start-site-exec.jar | |
build_java_docker_image: | |
name: Build and publish a JVM-based Docker image | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_IMAGE_NAME: 'ghcr.io/azure/spring/spring-initializr' | |
if: ${{ github.repository == 'Azure/azure-spring-initializr' && github.event_name != 'pull_request' }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Login to GitHub Packages | |
run: docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
check-latest: false | |
cache: 'maven' | |
- name: Build with Maven | |
run: mvn -B clean install --file pom.xml -DskipTests | |
- name: Build the Docker image | |
run: mvn spring-boot:build-image -Dspring-boot.build-image.imageName=${{ env.DOCKER_IMAGE_NAME }}:main -DskipTests | |
working-directory: ${{ github.workspace }}/start-site | |
- name: Push to GitHub Packages | |
run: docker push ${{ env.DOCKER_IMAGE_NAME }}:main | |
if: ${{ github.repository == 'Azure/azure-spring-initializr' && github.event_name != 'pull_request' }} |