https://cypress.io logo
Cypress cloud for pr's run in github actions trigg...
# i-need-help
p
I have an open source app (code: https://github.com/cuttle-cards/cuttle) that runs cypress tests in github actions when pr's are submitted and/or updated. The test runs are recorded in cypress cloud, and the record key is stored as a Github Secret that's shared with the workflow via an environment variable. This works well for PR's submitted by team members, but runs that are triggered by contributors outside of the organization do not get access to secrets in github action by default and therefore those runs are not recorded. It results in the following error message:
Copy code
Warning: It looks like you are trying to record this run from a forked PR.

The Record Key is missing. Your CI provider is likely not passing private environment variables to builds from forks.

These results will not be recorded.

This error will not alter the exit code.
Is there a standard approach to this setup i.e. where tests run in CI using github actions and get recorded in cypress cloud such that test-runs triggered by forks are recorded successfully? I could include the record key in the source code but this seems unideal as I'd prefer to only record the test runs that correspond to PR's against the main repo itself
m
Hi @powerful-gigabyte-69168 This use case has also been described in https://github.com/cypress-io/github-action/issues/796. I don't know of any clean solution and the problem is not specific to GitHub actions. It is a general issue for any repository with open source external contributors recording into the Cypress Cloud. There is a separate board https://discord.com/channels/755913899261296641/1064949020235149442 for Cypress Cloud. It would be good to get some feedback from the Cypress.io team on this need.
p
Thanks @many-airline-45402. So it looks like you've opened a PR to resolve the issue, here? https://github.com/cypress-io/github-action/pull/751
m
That solves a related but different issue. Each fork user can have their own Cypress Cloud project ID and record into that. It doesn't solve your issue where you want every fork user to record into one central project id. Sorry 🙁 !
p
Ah yes that makes sense
Does mine sound like an unusual use-case? Open source project where we want to centrally record test runs against the main repo from forks?
m
I don't know about the numbers of open source projects which would like this. I think it is a completely understandable request and you could formally submit it as a feature request on https://github.com/cypress-io/cypress/issues. If you happen to be a paying customer of Cypress Cloud then you can check the additional support channel on https://www.cypress.io/support/.