ci: skip credential-dependent steps in fork runs - #361
Merged
Conversation
negz
approved these changes
Jul 21, 2026
Collaborator
|
Seems like the CI check isn't running on this PR. 🤔 |
Collaborator
|
@haarchri I think https://github.com/crossplane/crossplane/blob/5cee1b741af3c62e81e4284cc424e9790af7fead/.github/workflows/ci.yml#L14-L19 |
negz
requested changes
Jul 27, 2026
negz
left a comment
Collaborator
There was a problem hiding this comment.
(Can't merge as-is per last comment.)
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
Signed-off-by: Christopher Haar <christopher.haar@upbound.io>
haarchri
force-pushed
the
fix/ci-on-forks
branch
from
July 31, 2026 09:46
60d0dfa to
9cca754
Compare
Contributor
Author
|
remembers my why i like github-ci workflows ... |
negz
approved these changes
Jul 31, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of your changes
Fork PRs do not have access to repository secrets, causing the registry login, push, and Algolia crawl steps to fail or run unnecessarily.
Split Build and Push into separate Build and Push steps, move Build before auth so CI fails fast on build errors before touching credentials
Gate Login to registry and Push on
secrets.UP_ROBOT_ID != ''so forks build but skip the pushGate the docsearch crawl job on
secrets.ALGOLIA_ADMIN_KEY != ''so scheduled runs in forks don't spin up a runner at allFixes #
I have:
nix flake check(or./nix.sh flake check) and made sure it passes.git commit -s.