Skip to content

Conversation

@aedwardg
Copy link
Collaborator

@aedwardg aedwardg commented Dec 26, 2024

Closes #6

This change should ensure the following happens:

  • On any push to branches within this repo, the format-and-lint action runs.
  • The format-and-lint action only runs on pull_request events when that pull request is from a forked repo, ensuring that we don't have double runs on every single push.

For this PR, you can see that the pull_request job is skipped

image

As can be seen in #12, only the pull_request events trigger the action when it is from a forked repo
image

Copy link
Member

@Victoria-DR Victoria-DR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aedwardg aedwardg merged commit 46f92f9 into main Dec 26, 2024
3 checks passed
@aedwardg aedwardg deleted the 6-avoid-double-runs-for-gh-actions branch December 26, 2024 01:20
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

Successfully merging this pull request may close these issues.

Avoid double runs for github actions

3 participants