aormsby / Fork-Sync-With-Upstream-action

An action to automatically update your fork with new commits from the upstream repo
MIT License
258 stars 70 forks source link

I want to ignore specific files from upstream. #39

Closed olegbal closed 2 years ago

olegbal commented 3 years ago

Hi. I've found that if upstream repo will have new actions files , then you'll have an error like i had image

Because new ci.yml file added in upstream branch i can't push it via github actions. Is it possible to ignore somehow these files?? Also tried adding any new yml files to .gitignore and restricting access for actions image

Also tried to generate personal access token with ALL permissions (including workflow) and used it as target_repo_token argument.

Can you please take a look??

aormsby commented 3 years ago

Actually, I think your updated token is supposed to work. The token created by the action won't have workflow permissions, but a new PAT you create could, which you seem to have figured out as well.

I don't know what's in your workflow so I can only guess a bit, but do you have persist-credentials: false in the checkout step? Try that if you don't.

If you can share more details like the workflow or even the repos you're working with, I can try to reproduce the issue. If you can't, no worries. It'll just be a little harder to suss out the problem.

olegbal commented 3 years ago

Hi. I don't have "persist-credentials" option at all. As far as i remember it is only for private repos? Here is my workflow file https://github.com/olegbal/jitsi-meet/actions/runs/1418240492/workflow

For now problem is fixed "manually". I consider this issue for now as 'merge conflict'. Case looks like: 1) My first fork OK. 2) I've removed all fork's github actions .yml 3) To add my github actions file i had to give permissions for all actions (including fork actions) 4) Fetch upstream works well before upstream repo don't have any new actions files 5) Upstream repo have new action file ->> can't push. See screenshots above.

aormsby commented 3 years ago

Hi. I don't have "persist-credentials" option at all. As far as i remember it is only for private repos?

Sure, but you're trying to replace the token the action created with the one you want to use. If you don't set that to false, it won't happen.