-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b44d2a
commit 27c8e4c
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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 }} |