Improve ds to save errors #286
Workflow file for this run
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
name: Trevas Lab CI | |
on: | |
#schedule: | |
#- cron: "0 10 * * *" # everyday at 10am | |
push: | |
branches: | |
- "**" | |
tags: | |
- "*" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Maven Central Repository | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: "adopt" | |
- name: Set current version | |
run: mvn -B versions:set -DnewVersion=${GITHUB_REF##*/} -DprocessAllModules -DgenerateBackupPoms=false | |
- uses: s4u/[email protected] | |
with: | |
githubServer: false | |
servers: | | |
[{ | |
"id": "Github", | |
"username": "${{ secrets.GH_PACKAGES_USERNAME }}", | |
"password": "${{ secrets.GH_PACKAGES_PASSWORD }}" | |
}] | |
- name: Build with Maven | |
run: mvn -B package -DskipTests -U | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: trevas-lab | |
path: target/ | |
docker: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Download artifact | |
id: download | |
uses: actions/download-artifact@v2 | |
with: | |
name: trevas-lab | |
path: target/ | |
- name: Get current version | |
id: version | |
run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" | |
- run: echo ${{steps.version.outputs.prop}} | |
- name: Publish to DockerHub | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: inseefrlab/trevas-lab | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
tags: ${{steps.version.outputs.prop}} |