diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 4110f14..625dadc 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -12,33 +12,37 @@ jobs: push_to_registry: name: Push image to docker hub runs-on: ubuntu-latest + strategy: + matrix: + platform: [amd64, arm64] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Set tag + run: | + if [ "${{ matrix.platform }}" = "arm64" ]; then + echo "tag=ministryofjustice-fork-arm64" >> "$GITHUB_ENV" + else + echo "tag=ministryofjustice-fork" >> "$GITHUB_ENV" + fi + - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: push: true - tags: ministryofjustice/tech-docs-github-pages-publisher:ministryofjustice-fork + tags: ministryofjustice/tech-docs-github-pages-publisher:${{ env.tag }} build-args: | BUNDLE_RUBYGEMS__PKG__GITHUB__COM=${{ secrets.GITHUB_TOKEN }} - - - name: Report failure to Slack - if: always() - uses: ravsamhq/notify-slack-action@v2 - with: - status: ${{ job.status }} - notify_when: "failure" - notification_title: "Failed GitHub Action Run" - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file