Skip to content

Prevent release attempt from fork#777

Merged
jaffrepaul merged 1 commit into
cypress-io:masterfrom
MikeMcC399:fix/block-release-in-fork
Feb 10, 2023
Merged

Prevent release attempt from fork#777
jaffrepaul merged 1 commit into
cypress-io:masterfrom
MikeMcC399:fix/block-release-in-fork

Conversation

@MikeMcC399

Copy link
Copy Markdown
Collaborator

This PR partially addresses issue #715 "Issues with cycjimmy/semantic-release-action in main workflow (Rev 2)" where .github/workflows/main.yml may run in a fork, attempting to carry out a release, which then fails with an error message due to lack of write permissions to the parent repository.

The PR restricts the release job of .github/workflows/main.yml so that it only runs on the repository cypress-io/github-action and not on a fork of this repository.

Verification

In a fork, ensure that workflows are enabled (Settings > Actions > General > Allow all actions and reusable workflows) and that the specific main workflow is not disabled (Actions > Show more workflows ... > main).

Push a commit to the master branch.

The release job should show "This job was skipped".

Verify also on a copy of the repository that a release is carried out when pushing to the parent master branch.

@MikeMcC399

Copy link
Copy Markdown
Collaborator Author

Tested in fork and copy of repo.

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399 MikeMcC399 force-pushed the fix/block-release-in-fork branch from 4dffc67 to 03ecb33 Compare February 10, 2023 12:44
@jaffrepaul jaffrepaul merged commit 9e4be0b into cypress-io:master Feb 10, 2023
@MikeMcC399 MikeMcC399 deleted the fix/block-release-in-fork branch February 10, 2023 21:15
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.0.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants