diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc284e7861..cb2ed7296d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -451,15 +451,8 @@ jobs: env: PLATFORMS: "${{ join(fromJson(needs.build-setup.outputs.platforms), ',') }}" - DOCKER_IMAGE: "ghcr.io/getsentry/${{ matrix.image_name }}" - REVISION: "${{ github.event.pull_request.head.sha || github.sha }}" steps: - - uses: actions/checkout@v4 - - - uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v3 - - uses: actions/download-artifact@v4 with: pattern: "${{ matrix.image_name }}@*" @@ -467,26 +460,14 @@ jobs: - name: Build and push to ghcr.io if: "!github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]'" - run: | - docker login --username '${{ github.actor }}' --password '${{ secrets.GITHUB_TOKEN }}' ghcr.io - - docker buildx build \ - --platform "${PLATFORMS}" \ - --tag "${DOCKER_IMAGE}:${REVISION}" \ - $( [[ "${IS_MASTER}" == "true" ]] && printf %s "--tag ${DOCKER_IMAGE}:nightly" ) \ - --file Dockerfile.release \ - --push \ - . - - - name: Build and publish docker artifact - if: "github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]'" - run: | - docker buildx build \ - --platform "${PLATFORMS}" \ - --tag "${DOCKER_IMAGE}:${REVISION}" \ - --file Dockerfile.release \ - --output type=docker,dest=${{ matrix.image_name }}-docker-image \ - . + uses: getsentry/action-build-and-push-images@845ca2858b930130fc39268d7df9e60fe5009e0c + with: + image_name: ${{ matrix.image_name }} + platforms: $PLATFORMS + dockerfile_path: "./Dockerfile.release" + ghcr: true + google_ar: false + publish_on_pr: true - name: Upload docker image if: "github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]'" @@ -572,7 +553,7 @@ jobs: matrix: image_name: ["relay"] # Don't publish relay-pop (for now) - if: github.event_name == 'merge_group' + if: github.event_name == 'merge_group' env: GHCR_DOCKER_IMAGE: "ghcr.io/getsentry/${{ matrix.image_name }}"