From 80efa8d48d8c1fd55803dfe022753a700edc154d Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Fri, 11 Jul 2025 15:35:00 -0700 Subject: [PATCH 1/6] testing composite action --- .github/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc284e7861..5d90cfb438 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -467,16 +467,13 @@ 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 \ - . + uses: getsentry/action-build-and-push-images@3e678a5b35eb78afec14922aa822c8923a2d2e32 + with: + image_name: "${{ matrix.image_name }}" + platforms: "${PLATFORMS}" + dockerfile: "./Dockerfile.release" + publish_to_ghcr: true + publish_to_gar: false - name: Build and publish docker artifact if: "github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]'" @@ -572,7 +569,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 }}" From 10fffcb76e7831af8cccedccd31e59592fb4ad0c Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Fri, 11 Jul 2025 15:56:52 -0700 Subject: [PATCH 2/6] try just Dockerfile.release --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d90cfb438..89bf8cfd1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,7 +471,7 @@ jobs: with: image_name: "${{ matrix.image_name }}" platforms: "${PLATFORMS}" - dockerfile: "./Dockerfile.release" + dockerfile: "Dockerfile.release" publish_to_ghcr: true publish_to_gar: false From 2692c75363465ae5b9f12fda46d74a3f1e0b1875 Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Fri, 11 Jul 2025 16:01:49 -0700 Subject: [PATCH 3/6] use right input param --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89bf8cfd1f..019c33530b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,7 +471,7 @@ jobs: with: image_name: "${{ matrix.image_name }}" platforms: "${PLATFORMS}" - dockerfile: "Dockerfile.release" + dockerfile_path: "./Dockerfile.release" publish_to_ghcr: true publish_to_gar: false From 1aad043e40c092295ed7b3c5aca93ef44f2bde6a Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Fri, 11 Jul 2025 16:06:23 -0700 Subject: [PATCH 4/6] use correct inputs once more --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 019c33530b..280246dfa3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -470,10 +470,10 @@ jobs: uses: getsentry/action-build-and-push-images@3e678a5b35eb78afec14922aa822c8923a2d2e32 with: image_name: "${{ matrix.image_name }}" - platforms: "${PLATFORMS}" + platform: "${PLATFORMS}" dockerfile_path: "./Dockerfile.release" - publish_to_ghcr: true - publish_to_gar: false + ghcr: true + gar: false - name: Build and publish docker artifact if: "github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]'" From 4be28dd94c95f4827b85fdb7d5a470cb81393e80 Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Thu, 17 Jul 2025 14:44:22 -0700 Subject: [PATCH 5/6] bump sha and change inputs --- .github/workflows/ci.yml | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 280246dfa3..2f655d7d88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -449,17 +449,10 @@ jobs: matrix: image_name: ${{ fromJson(needs.build-setup.outputs.image_names) }} - 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 }}" + env: + PLATFORMS: "${{ join(fromJson(needs.build-setup.outputs.platforms), ',') }}" 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,23 +460,14 @@ jobs: - name: Build and push to ghcr.io if: "!github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]'" - uses: getsentry/action-build-and-push-images@3e678a5b35eb78afec14922aa822c8923a2d2e32 + uses: getsentry/action-build-and-push-images@845ca2858b930130fc39268d7df9e60fe5009e0c with: - image_name: "${{ matrix.image_name }}" - platform: "${PLATFORMS}" + image_name: ${{ matrix.image_name }} + platforms: $PLATFORMS dockerfile_path: "./Dockerfile.release" ghcr: true - gar: false - - - 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 \ - . + google_ar: false + publish_on_pr: true - name: Upload docker image if: "github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]'" From 605664d53a4a96e6238beffe727dc482b5907f49 Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Thu, 17 Jul 2025 14:50:25 -0700 Subject: [PATCH 6/6] fix indent --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f655d7d88..cb2ed7296d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -449,8 +449,8 @@ jobs: matrix: image_name: ${{ fromJson(needs.build-setup.outputs.image_names) }} - env: - PLATFORMS: "${{ join(fromJson(needs.build-setup.outputs.platforms), ',') }}" + env: + PLATFORMS: "${{ join(fromJson(needs.build-setup.outputs.platforms), ',') }}" steps: - uses: actions/download-artifact@v4