Hi all,
I have a personal mirror of the Hatari source in GitHub which I updated for the first time in a long time today. This pulled in the GitHub action .github/workflows/repo-sync.yml that performs the sync from tuxfamily to GitHub. This was failing for me because I hadn't set up a personal access token as a secret variable MIRROR_PAT in my repository. (I only noticed when I realised I had multiple failed runs of repo-sync.yml, one every six hours since I manually updated the code in my mirror!)
I have fixed the problem in my mirror by adding a personal access token as a secret variable. The sync now runs successfully every six hours and I'm happy because I'm no longer receiving emails about failed actions.
But this made me wonder: did I do the right thing? I'm not a big Hatari developer and it's a little wasteful to update my personal mirror every six hours. Would it be more appropriate to make a change such that the
repo-sync.yml action only runs on the repo
github.com/hatari/hatari and not in any other mirrors?
Ways that this could be achieved:
- Check the repo name in repo-sync.yml and only run the action if the repo is hatari/hatari
- Add an environment variable that controls whether the action runs
- Something else (I'm not a heavy GitHub user so there might be something obvious that I've missed!)
Do any of the above options sound like a good idea?
Cheers,
Chris