Clean up #100
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: Build and publish docker image | |
on: | |
push: | |
branches: | |
- '**' # matches every branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKERHUB_SIMPLEDOTORG_USERNAME}} | |
password: ${{secrets.DOCKERHUB_SIMPLEDOTORG_ACCESS_TOCKEN}} | |
- uses: stCarolas/setup-maven@v4.5 | |
with: | |
maven-version: 3.9.6 | |
- name: Sets up version | |
working-directory: rtsl_util | |
run: mvn versions:set -DnewVersion=${{github.ref_name}}.${{github.run_number}} | |
- name: Builds Artifacts and Images | |
working-directory: rtsl_util | |
run: mvn clean install | |
- name: Lists all docker images | |
working-directory: rtsl_util | |
run: docker image list | |
- name: Publish Images | |
working-directory: rtsl_util | |
run: docker push simpledotorg/prometheusdbexporter:${{github.ref_name}}.${{github.run_number}} | |
- name: Archive Dhis2TestTool jar file | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Dhis2CucumberTestTool-${{github.ref_name}}.${{github.run_number}}.jar | |
path: rtsl_util/CommonUtils/Dhis2CucumberTestTool/target/Dhis2CucumberTestTool-${{github.ref_name}}.${{github.run_number}}.jar | |
- run: find . -name "*.jar" |