File tree Expand file tree Collapse file tree
build-publish-image-dockerhub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : " Build and Publish Docker Image"
2+ description : " Build and publish a Docker image to Docker Hub"
3+
4+ inputs :
5+ image_name :
6+ description : " Docker Hub image name"
7+ required : true
8+ release_tag :
9+ description : " Release tag version"
10+ required : true
11+
12+ runs :
13+ using : " composite"
14+ steps :
15+ - name : Set up Docker Buildx
16+ uses : docker/setup-buildx-action@v3
17+
18+ - name : Log in to Docker Hub
19+ uses : docker/login-action@v4
20+ with :
21+ username : ${{ env.DOCKER_USERNAME }}
22+ password : ${{ env.DOCKER_PASSWORD }}
23+
24+ - name : Set Docker Image Tag
25+ id : tags
26+ shell : bash
27+ run : |
28+ echo "tags=${{ inputs.image_name }}:${{ inputs.release_tag }},${{ inputs.image_name }}:latest" >> $GITHUB_OUTPUT
29+
30+ - name : Build and Push Docker Image
31+ uses : docker/build-push-action@v7
32+ with :
33+ context : .
34+ file : ./Dockerfile
35+ push : true
36+ tags : ${{ steps.tags.outputs.tags }}
37+ provenance : true
38+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 1- name : " Build and Publish Docker Image"
2- description : " Build and publish a Docker image to GitHub Container Registry"
3-
4- inputs :
5- version :
6- description : " The version tag to apply to the Docker image"
7- required : true
8-
9- runs :
10- using : " composite"
11- steps :
12- - name : Log in to GitHub Container Registry
13- uses : docker/login-action@v3
14- with :
15- registry : ghcr.io
16- username : ${{ github.repository_owner }}
17- password : ${{ env.GH_TOKEN }}
18-
19- - name : Print release version input
20- shell : bash
21- run : echo "Input release version =${{ inputs.version }}"
22- - name : Docker meta
23- id : meta
24- uses : docker/metadata-action@v5
25- with :
26- images : |
27- ghcr.io/${{ github.repository }}
28- tags : |
29- type=semver,pattern={{version}}
30- ${{ inputs.version }}
31-
32- - name : Build/push container image
33- uses : docker/build-push-action@v6
34- with :
35- context : .
36- file : ./Dockerfile
37- push : true
38- tags : ${{ steps.meta.outputs.tags }}
39- labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 6565 SHORT_SHA="${GITHUB_SHA:0:7}"
6666 echo "image_version=${{ github.run_number }}-${SHORT_SHA}" >> $GITHUB_OUTPUT
6767
68- docker :
69- name : Build and Publish Docker Image to GHCR
70- runs-on : ubuntu-latest
71- needs : build
72- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
73- steps :
74- - name : Checkout repo
75- uses : actions/checkout@v4
76-
77- - name : Build and publish Docker image
78- uses : ./.github/actions/build-publish-image-ghcr
79- with :
80- version : ${{ needs.build.outputs.image_version }}
81-
8268 unit-test :
8369 name : Unit Tests
8470 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1313 CI_DEPLOY_PASSWORD : ${{ secrets.CI_DEPLOY_PASSWORD }}
1414 CI_GPG_PASSPHRASE : ${{ secrets.CI_GPG_PASSPHRASE }}
1515 GH_TOKEN : ${{ secrets.GH_TOKEN }}
16+ DOCKER_USERNAME : finos
17+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
1618
1719on :
1820 workflow_dispatch :
@@ -104,6 +106,7 @@ jobs:
104106 git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "https://github.com/"
105107
106108 - name : Prepare release
109+ continue-on-error : true
107110 run : |
108111 mvn -B \
109112 -DpreparationGoals=clean \
@@ -116,6 +119,7 @@ jobs:
116119 -DinteractiveMode=false
117120
118121 - name : Perform release
122+ continue-on-error : true
119123 run : |
120124 mvn -B \
121125 -DinteractiveMode=false \
@@ -130,6 +134,13 @@ jobs:
130134 - name : Build distro ZIP only
131135 run : mvn -B -e -DskipTests -pl distro/run/distro -am package -s ./settings.xml
132136
137+ - name : Build and publish Docker image
138+ if : startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/hotfix/')
139+ uses : ./.github/actions/build-publish-image-dockerhub
140+ with :
141+ image_name : finos/fluxnova-bpm-platform
142+ release_tag : ${{ env.RELEASE_VERSION }}
143+
133144 notify-external-repos :
134145 name : Notify fluxnova-examples of new release
135146 needs : publish-central
Original file line number Diff line number Diff line change 126126 <groupId >org.apache.groovy</groupId >
127127 <artifactId >groovy-datetime</artifactId >
128128 </dependency >
129+ <dependency >
130+ <groupId >org.postgresql</groupId >
131+ <artifactId >postgresql</artifactId >
132+ </dependency >
129133
130134 </dependencies >
131135
You can’t perform that action at this time.
0 commit comments