Closed ReenigneArcher closed 1 year ago
Also, another major issue.
I ran this manually, and it pushed changes to branches that it definitely should not do.
Thankfully it only modified dependabot PRs which are easy to recreate.
Am I misunderstanding the purpose of this action?
It also never created a PR against nightly
which is what I would have expected to happen.
Luckily github prevented this from going too crazy: https://github.com/RetroArcher/.github/runs/7163456889?check_suite_focus=true
Edit: I see that the branches use regex, so I will switch it to ^nightly$
which I believe will only match nightly
exactly.
Using ^nightly$
for the branches
does indeed solve the problem of pushing to the dependabot branches. Note this was in combination with an automerge workflow as suggested in the readme. I've also added BASE_BRANCHES: nightly
to the automerge action to prevent any accidental automatic merges.
But going back to the original issue. I guess the workflow caches the changes? Can you add an option to disable the cache? I would like to run this on a schedule if possible, but it currently does nothing if there is a cache.
Problems with using the cache:
GH_TOKEN
, but in my case I forgot I needed to use GH_PAT
, but still everything was cached even though the workflow failed.@ReenigneArcher thanks a lot for taking time to report such a detailed issue šš¼
I guess the workflow caches the changes
there is no caching done in the action
I would like to run this on a schedule if possible
for now it works on push
and workflow_dispatch
. I think supporting schedule
should not be very complex, as to my knowledge, it would work completely the same way workflow_dispatch
is. Please create separate issue so we do not mix to many concerns in the same issue.
regarding the original problem, the link that you shared: https://github.com/RetroArcher/.github/runs/7163398223 it actually points to https://github.com/RetroArcher/.github/commit/199d96607a3a1cc486155ed20603e1446c42a68d and there were really no changes related to workflows other than the global one
the action works in the way that it picks up only files that were modified with a given commit, and not all files -> https://github.com/derberg/copy-files-to-other-repositories/blob/main/lib/utils.js#L23-L29
only in case of workflow_dispatch
we take all -> https://github.com/derberg/copy-files-to-other-repositories/blob/main/lib/utils.js#L31-L35
there are basically 2 use cases, you want to replicate all changes in all repos (or just selected one) on demand using workflow_dispatch
or you just want to replicate changes that came with a given commit. I hope that makes sense
I misunderstood the manual workflow run. I did not realize if no repo was supplied it would run against all.
Do I understand correctly, that if I run on a schedule it will behave the same as running as workflow dispatch with no repository supplied?
Do I understand correctly, that if I run on a schedule it will behave the same as running as workflow dispatch with no repository supplied?
I answered:
for now it works on push and workflow_dispatch. I think supporting schedule should not be very complex, as to my knowledge, it would work completely the same way workflow_dispatch is. Please create separate issue so we do not mix to many concerns in the same issue.
for now, if you use schedule, you will get error like: 'This GitHub Action works only when triggered by "push" or "workflow_dispatch" webhooks.'
Okay, thanks for the clarification. Originally, I wasn't sure if you were referring to the action or my workflow yaml. Thanks.
Looks like answered and therefore solved.
Closing, lemme know if I'm wrong
Describe the bug
A clear and concise description of what the bug is.
When running the workflow I get a message "no changes detected".
How to Reproduce
Steps to reproduce the issue. Attach all resources that can help us understand the issue:
Expected behavior
A clear and concise description of what you expected to happen.
The workflow should compare the files found by "patterns" to the files in the destination repositories. If they don't match exactly it should create the PR in the destination repository.