Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMBourgeois committed Apr 5, 2024
1 parent 6b44d2a commit 27c8e4c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
Expand All @@ -24,15 +24,15 @@ jobs:
- name: Test with Maven
run: mvn test
- name: Upload test artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: test
path: target/
sonarcloud:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
needs: sonarcloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
Expand All @@ -59,26 +59,26 @@ jobs:
- name: Build with Maven
run: mvn package -DskipTests
- name: Upload build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: target/

docker:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Require artifact from build step
- name: Download build artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: build
path: target/
- name: Docker meta
id: docker_meta
uses: crazy-max/[email protected]
uses: docker/metadata-action@v5
with:
images: inseefr/metadata-api # list of Docker images to use as base name for tags
- name: Set up QEMU
Expand All @@ -99,7 +99,7 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ steps.docker_meta.outputs.tags }}
${{ github.ref == 'refs/heads/master' && 'inseefr/metadata-api:latest' || '' }}
${{ github.ref == 'refs/heads/main' && 'inseefr/metadata-api:latest' || '' }}
labels: ${{ steps.docker_meta.outputs.labels }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 27c8e4c

Please sign in to comment.