diff --git a/.github/workflows/crates.io-publish.yml b/.github/workflows/crates.io-publish.yml index e30d443..34ee8d9 100644 --- a/.github/workflows/crates.io-publish.yml +++ b/.github/workflows/crates.io-publish.yml @@ -38,8 +38,8 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }} - publish-hub_docker_com-linux_amd64: - name: Publish to hub.docker.com (linux/amd64) + publish-hub_docker_com: + name: Publish to hub.docker.com needs: - publish-crates_io @@ -48,24 +48,7 @@ jobs: with: release-version: ${{ github.ref_name }} - target-platforms: linux/amd64 secrets: dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} - - publish-hub_docker_com-linux_arm64: - name: Publish to hub.docker.com (linux/arm64) - - needs: - - publish-crates_io - - uses: ./.github/workflows/hub.docker.com-publish.yml - - with: - release-version: ${{ github.ref_name }} - target-platforms: linux/arm64 - - secrets: - dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/hub.docker.com-publish.yml b/.github/workflows/hub.docker.com-publish.yml index 7c79160..dc2e9d9 100644 --- a/.github/workflows/hub.docker.com-publish.yml +++ b/.github/workflows/hub.docker.com-publish.yml @@ -1,6 +1,9 @@ name: Publish Docker Image on: + # Enable the occasional manual trigger + workflow_dispatch: + # This workflow is designed to be invoked by others, not triggered by events. workflow_call: inputs: @@ -36,25 +39,26 @@ on: description: Docker Hub password to use when publishing the image (e.g. the API token) jobs: - publish: - name: Build & Publish ${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }} for ${{ inputs.target-platforms }} + build-and-push: + name: Build&Push ${{ inputs.dockerhub-org }}/${{ inputs.dockerhub-imagename }}:${{ inputs.release-version }} (${{ inputs.target-platforms }) runs-on: ubuntu-latest steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set-up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.dockerhub-username }} password: ${{ secrets.dockerhub-password }} - - name: Set-up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - platforms: ${{ inputs.target-platforms }} - - - name: Build & Push + - name: Build + Push uses: docker/build-push-action@v5 with: push: true