Skip to content

draft: Testing composite action #4934

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 9 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,42 +451,23 @@ 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 }}@*"
merge-multiple: true

- 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]'"
Expand Down Expand Up @@ -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 }}"
Expand Down
Loading