Skip to content
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

GHA recording workflows fail in fork on push event #810

Open
MikeMcC399 opened this issue Mar 17, 2024 · 0 comments
Open

GHA recording workflows fail in fork on push event #810

MikeMcC399 opened this issue Mar 17, 2024 · 0 comments

Comments

@MikeMcC399
Copy link
Contributor

Issue

Each of the three example workflows for GitHub Actions demonstrates recording into Cypress Cloud. If a new user forks the repository and pushes any commit, then these workflows fail because the necessary projectId / Record Key combination is missing.

The repository is set up to use the Cypress Cloud project with projectId 4b7344 owned by the Cypress.io organization. The project has Public read access and can only be used to record with an associated Record Key, which is not made generally available.

The workflows affected are:

Workflow file Workflow name
.github/workflows/parallel.yml Cypress parallel tests
.github/workflows/single.yml Cypress single tests
.github/workflows/using-action.yml Using Cypress GH Action

The workflows are each set up with push and workflow_dispatch events:

on: [push, workflow_dispatch]

Workarounds

Workaround 1 - Disable workflows

Refer to the GitHub documentation Disabling and enabling a workflow, individually disable each of the workflows:

Workflow name
Cypress parallel tests
Cypress single tests
Using Cypress GH Action

Workaround 2 - Set up personal Cypress Cloud project

Follow the Cypress Cloud documentation to sign up, if you do not already have an account, or to sign in if you have an account.

Create a new project if one does not exist.

Access "Project settings" in Cypress Cloud and copy the Project ID into the file cypress.config.js in the master (default) branch of your fork of the repository. This replaces the projectId 4b7344.

Copy a Record Key also from "Project settings" into the Security settings of your GitHub fork, using "Secrets and variables" > "Actions", then "Secrets" for the "Record Key" as in the table below:

Cypress Cloud name Actions name in fork Variable type
Record Keys DASHBOARDRECORDKEY Actions secrets

Refer to the GitHub documentation

Related issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant