This is an automated email from the ASF dual-hosted git repository. adamsaghy pushed a commit to branch FINERACT-2326/publish-releases-to-docker in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 5bc957b952fb2c6d47579e4bd67cffd967ca3c43 Author: Adam Saghy <[email protected]> AuthorDate: Wed Sep 17 13:07:31 2025 +0200 FINERACT-2326: Publish all tags to DockerHub --- .../workflows/publish-all-tags-to-docker-hub.yml | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/publish-all-tags-to-docker-hub.yml b/.github/workflows/publish-all-tags-to-docker-hub.yml new file mode 100644 index 0000000000..eaec94849b --- /dev/null +++ b/.github/workflows/publish-all-tags-to-docker-hub.yml @@ -0,0 +1,44 @@ +name: Publish All Tags to DockerHub + +on: [push, pull_request] + +permissions: + contents: read +jobs: + publish: + runs-on: ubuntu-24.04 + timeout-minutes: 60 + env: + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + steps: + - name: Checkout Source Code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4 + with: + fetch-depth: 0 # fetch full history including tags + + - name: Set up JDK 21 + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4 + with: + java-version: '21' + distribution: 'zulu' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1 + + - name: Build & Push all Git tags with Jib + run: | + git fetch --tags --force + TAGS=$(git tag --list) + + for TAG in $TAGS; do + echo "🏷️ Building and publishing Docker image for tag: $TAG" + + git checkout $TAG + + ./gradlew --no-daemon --console=plain :fineract-provider:jib -x test -x cucumber \ + -Djib.to.auth.username=${{secrets.DOCKERHUB_USER}} \ + -Djib.to.auth.password=${{secrets.DOCKERHUB_TOKEN}} \ + -Djib.from.platforms=linux/amd64,linux/arm64 \ + -Djib.to.image=apache/fineract \ + -Djib.to.tags=$TAG + done
