Updating the docker-release file #5
Workflow file for this run
This file contains hidden or 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
| # Copyright IBM Corp. All Rights Reserved. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| name: Release Fabric-X Committer Docker Image | |
| on: | |
| push: | |
| tags: | |
| - "v*" # Trigger on tags like v0.0.1 | |
| jobs: | |
| docker-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU (for cross-platform builds) | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
| - name: Extract version from tag | |
| id: extract | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Build and push multi-platform Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: docker/images/release/Dockerfile | |
| platforms: linux/amd64,linux/arm64,linux/s390x | |
| push: true | |
| build-args: | | |
| BIN=committer | |
| ARCHBIN_PATH=output | |
| PORTS=7050 | |
| tags: | | |
| docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/fabric-x-committer:latest | |
| docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/fabric-x-committer:${{ env.VERSION }} |