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

Don't run builder GitHub Actions on forks #8631

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chosak
Copy link
Member

@chosak chosak commented Nov 6, 2024

Currently there are two GitHub Actions for this repository that attempt to gate their execution by ensuring that they don't run on forks, using the check

if: github.repository == 'cfpb/consumerfinance.gov'

This doesn't work properly, because on PRs this still refers to this repo (cfpb/consumerfinance.gov), not the fork.

You can see an example where this didn't work right on #8617, where @lfatty opened a PR from his fork but the "Build cf.gov artifact" action still ran.

This PR attempts to fix the syntax to work properly using this check instead:

if: "! github.event.pull_request.head.repo.fork"

I've created this PR from my fork so these two actions should not run.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines

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.

1 participant