Skip to content

Commit

Permalink
Update build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMBourgeois authored May 2, 2024
1 parent 7439c6e commit 28e5486
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v2 # Updated to use the latest version of the setup-java action
uses: actions/setup-java@v2
with:
distribution: 'temurin' # Best practice to specify the Java distribution
distribution: 'temurin'
java-version: '17'
- name: Set current version
run: mvn -B versions:set -DnewVersion=${{ github.ref_name }} -DprocessAllModules -DgenerateBackupPoms=false
- name: Test with Maven
run: mvn test
- name: Upload test artifact
Expand Down Expand Up @@ -55,8 +53,9 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'
- name: Set current version
run: mvn -B versions:set -DnewVersion=${{ github.ref_name }} -DprocessAllModules -DgenerateBackupPoms=false
- name: Extract Maven project version
id: mvn_version
run: echo "::set-output name=version::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
- name: Build with Maven
run: mvn package -Dchangelist=-SNAPSHOT --no-transfer-progress
- name: Upload API war
Expand All @@ -78,9 +77,14 @@ jobs:
path: target/
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3 # Ensure to use the correct version
uses: docker/metadata-action@v3
with:
images: inseefr/metadata-api
tags: type=semver,pattern={{version}}
flavor: |
latest=false
env:
version: ${{ steps.mvn_version.outputs.version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand Down

0 comments on commit 28e5486

Please sign in to comment.