1212 types : [published]
1313
1414jobs :
15- docker :
15+ build :
16+ name : Build
1617 runs-on : ubuntu-latest
1718 steps :
18- - uses : actions/checkout@main
19+ - uses : fugerit-org/psychic- actions/maven-container-publish@mcp
1920 with :
20- # Shallow clones should be disabled for a better relevancy of analysis
21- fetch-depth : 0
22- - name : Echo ref name trigger
23- run : echo ${{ github.ref_name }}
24- - name : Set up JDK 21
25- uses : actions/setup-java@main
26- with :
27- java-version : ' 21'
28- distribution : ' corretto'
29- cache : ' maven'
30- - name : Cache Maven packages
31- uses : actions/cache@main
32- with :
33- path : ~/.m2
34- key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
35- restore-keys : ${{ runner.os }}-m2
36- - name : Cache SonarCloud packages
37- uses : actions/cache@main
38- with :
39- path : ~/.sonar/cache
40- key : ${{ runner.os }}-sonar
41- restore-keys : ${{ runner.os }}-sonar
42- - name : Maven version
43- run : mvn -v
44- env :
45- # Needed to get some information about the pull request, if any
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47- # SonarCloud access token should be generated from https://sonarcloud.io/account/security/
48- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
49- - name : Build and analyze
50- run : mvn -B clean package
51- # using action https://github.com/marketplace/actions/build-and-push-docker-images
52- - name : Set up QEMU
53- uses : docker/setup-qemu-action@master
54- - name : Set up Docker Buildx
55- uses : docker/setup-buildx-action@master
56- - name : Login to Docker Hub
57- uses : docker/login-action@master
58- with :
59- username : ${{ secrets.DOCKERHUB_USERNAME }}
60- password : ${{ secrets.DOCKERHUB_TOKEN }}
61- - name : Build and push
62- uses : docker/build-push-action@master
63- with :
64- context : .
65- file : src/main/docker/Dockerfile.corretto-jvm
66- platforms : linux/amd64,linux/arm64
67- push : true
68- tags : fugeritorg/fj-daogen-quarkus-demo:${{ github.ref_name }},fugeritorg/fj-daogen-quarkus-demo:latest
21+ github-token : ${{ secrets.GITHUB_TOKEN }}
22+ docker-file : ' ./src/main/docker/Dockerfile.corretto-jvm'
23+ docker-platforms : linux/amd64,linux/arm64
24+ docker-tags : ${{ secrets.DOCKERHUB_USERNAME }}/${{github.event.repository.name}}:${{ github.ref_name }},${{ secrets.DOCKERHUB_USERNAME }}/${{github.event.repository.name}}:latest
25+ dockerhub-username : ${{ secrets.DOCKERHUB_USERNAME }}
26+ dockerhub-password : ${{ secrets.DOCKERHUB_TOKEN }}
27+
0 commit comments