chore: prevent GitHub Actions recording examples running in fork - #1185
Open
MikeMcC399 wants to merge 3 commits into
Open
chore: prevent GitHub Actions recording examples running in fork#1185MikeMcC399 wants to merge 3 commits into
MikeMcC399 wants to merge 3 commits into
Conversation
Collaborator
|
Block running in a fork because the necessary Record Key is not accessible.
MikeMcC399
force-pushed
the
gha-examples-block-in-fork
branch
from
August 21, 2026 18:01
828f641 to
566bbbb
Compare
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.
Issue
The set of example CI workflows includes three GitHub Actions workflows that record to Cypress Cloud using a
projectIdowned by Cypress.io with a secret Record Key.These workflows fail if they are executed unchanged in a user fork of the parent repo. The fork has no access to the necessary Record Key.
Change
Prevent the above workflows running in a fork. Only run
if: github.repository_owner == 'cypress-io'.The exception is the
single-runjob of .github/workflows/using-action.yml which does not record, and so does not fail if a matching Record Key is missing. This job is not blocked from running.Verification
Attempt to manually run each of the above workflows in a fork, and confirm that they are skipped without error.
Note
Low Risk
CI-only guard conditions with no application, auth, or data-path changes; risk is limited to workflow skip behavior in forks versus the parent repo.
Overview
Forks of this repo were failing CI because example workflows record to Cypress Cloud using a Record Key secret that only exists on the parent
cypress-iorepository.This PR adds
if: github.repository_owner == 'cypress-io'to jobs that record to Cypress Cloud: the install job inparallel.yml, the test job insingle.yml, and theparallel-runsandparallel-runs-across-platformsjobs inusing-action.yml. Comments note that forks need their own project ID and Record Key to run those examples.The
single-runjob inusing-action.ymlis intentionally unchanged (noif) because it does not record, so it can still run in forks. That workflow also gets clearer job names and documentation; a stale top-of-file comment about pinningcypress-io/github-actionversions was removed.Reviewed by Cursor Bugbot for commit c3732c2. Bugbot is set up for automated code reviews on this repo. Configure here.