-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Make CI works for external contributors #503
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
Merged
markstory
merged 14 commits into
getsentry:main
from
aldy505:fix/ci-for-external-contrib
Nov 3, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
cdec3d7
fix: Make CI works for external contributors
aldy505 5e4fe46
fix: don't create multiplatform manifest for pull request, let it pass
aldy505 6a2505e
fix: apply fix from Seer
aldy505 4fdecf3
chore: run pre-commit
aldy505 be2123d
ci: don't know if this will work
aldy505 e224473
yikes
aldy505 5f19ff3
ci: try without matrix.platform
aldy505 ee111fa
ci: move create multipllatform manifest logic
aldy505 b0a3707
ci: use path instead of file name for download artifact
aldy505 1a8f6e4
ci: debug image tag
aldy505 cfbab3b
ci: try things out
aldy505 e61f094
ci: try to set the output to docker
aldy505 bd192c9
ci: remove debugging commands
aldy505 279a4aa
ci: push to GHCR for non-forks
aldy505 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,17 +28,31 @@ jobs: | |
| platforms: linux/${{ matrix.platform }} | ||
| dockerfile_path: './Dockerfile' | ||
| build_args: TASKBROKER_GIT_REVISION=${{ github.sha }} | ||
| ghcr: true | ||
| ghcr: ${{ github.event.pull_request.head.repo.fork == false }} | ||
| tag_suffix: -${{ matrix.platform }} | ||
| publish_on_pr: true | ||
| google_ar: false | ||
| tag_nightly: false | ||
| tag_latest: false | ||
| tags: ${{ github.event_name == 'pull_request' && 'ghcr.io/getsentry/taskbroker:nightly' || ''}} | ||
| outputs: ${{ github.event_name == 'pull_request' && 'type=docker' || ''}} | ||
|
|
||
| - name: Save Docker image to artifact | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| run: docker save -o /tmp/taskbroker.tar ghcr.io/getsentry/taskbroker:nightly | ||
|
|
||
| - name: Upload artifact for self-hosted e2e | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| with: | ||
| name: taskbroker-${{ matrix.platform }} | ||
| path: /tmp/taskbroker.tar | ||
| if-no-files-found: error | ||
| retention-days: 1 | ||
|
|
||
| assemble-taskbroker-image: | ||
| runs-on: ubuntu-latest | ||
| needs: [build] | ||
| if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }} | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
@@ -53,6 +67,7 @@ jobs: | |
| uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 | ||
|
|
||
| - name: Create multiplatform manifests | ||
| if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }} | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't we run the first two steps in this workflow all the time now? |
||
| run: | | ||
| docker buildx imagetools create \ | ||
| --tag ghcr.io/getsentry/taskbroker:${{ github.event.pull_request.head.sha || github.sha }} \ | ||
|
|
@@ -91,6 +106,19 @@ jobs: | |
| timeout-minutes: 30 | ||
|
|
||
| steps: | ||
| - name: Download artifact for pull request | ||
| uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| with: | ||
| name: taskbroker-amd64 | ||
| path: /tmp/ | ||
|
|
||
| - name: Load Docker image from tar file | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| run: | | ||
| docker image load --input /tmp/taskbroker.tar | ||
| docker image tag ghcr.io/getsentry/taskbroker:nightly ghcr.io/getsentry/taskbroker:${{ github.sha }} | ||
|
|
||
| - name: Run Sentry self-hosted e2e CI | ||
| uses: getsentry/self-hosted@master | ||
| with: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if there are two pull requests open at the same time? Could they conflict over this name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope. Github artifact is unique per commit run.