bridgelightcloud / github-mirror-action

Creative Commons Zero v1.0 Universal
11 stars 14 forks source link

Dealing with projects with .github/actions/workflow.yml #3

Open kaji-ryoji opened 2 years ago

kaji-ryoji commented 2 years ago

The default GITHUB_TOKEN secret does not allow touching files within .github/actions, any way to get around it?

amadigan commented 11 months ago

Sorry for the long delay, I’m not sure I understand. Do the permissions associated with the token really affect which files can be modified? Can you link to the documentation of this or provide an error message?

Note that mirroring github actions will have some limitations in any case: while all branches from the source repo can be mirrored, the default branch on the GH repo won’t be a mirror of a branch from the source repo.

rchauvin-ora commented 5 months ago

Hi @amadigan

It looks like the GITHUB_TOKEN has no permission to update/create files in the .github directory when mirroring. Here is an example of the error message:

! [remote rejected] main -> main (refusing to allow a GitHub App to create or update workflow .github/workflows/bazel-noenv.yaml without workflows permission)

It is probably required to use a PAT token.