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

Fix the cross-org sync workflow #25

Open
woodruffw opened this issue Aug 5, 2024 · 0 comments
Open

Fix the cross-org sync workflow #25

woodruffw opened this issue Aug 5, 2024 · 0 comments

Comments

@woodruffw
Copy link
Member

This repo gets sync'd with our other orgs (e.g. trail-of-forks) via sync.yml. This works just fine, if the sync step (i.e. git merge) doesn't include a workflow change. When it does include a workflow change the sync (and all future syncs) fail, since the default GITHUB_TOKEN doesn't have the workflow permission.

This results in the following obtuse error:

To https://github.com/crytic/.github
 ! [remote rejected] main -> main (refusing to allow a GitHub App to create or update workflow `.github/workflows/lint.yml` without `workflows` permission)
error: failed to push some refs to 'https://github.com/crytic/.github'
Error: Process completed with exit code 1.

To get around this, we either need a long-lived PAT (not ideal, since it'd essentially be a "god-mode" PAT for all of our orgs) or to make syncing more intelligent (e.g. have each repo be a stand-alone rather than a fork, and have each update only its non-workflow files on a schedule). The latter probably makes more sense.

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