Closed andylolz closed 2 years ago
Here’s a non-exhaustive list of scheduled actions:
I’ve probably missed some! I did this manually, but there’s probably some way to list them all using the github API.
Would it feel less hacky if the action just commented a thread to confirm that it had run, or even updated a timestamp visible to users of the service.....so the hack would at least be useful?
Would it feel less hacky if the action just commented a thread to confirm that it had run, or even updated a timestamp visible to users of the service.....so the hack would at least be useful?
Yeah, I think both of those are nice ideas.
We first need to confirm what Github counts as “repository activity”. We know commits to a non-default branch don’t count. I assume comments on issues do count… But it’s worth confirming that.
Hopefully fixed here: https://github.com/codeforIATI/workflow-restarter
This uses the github API to check for stopped workflows. If a workflow has stopped, it’s restarted. The repo keeps its own workflow alive by regularly committing to its own default branch.
Amazing work, thanks @andylolz !
Rationale
Code for IATI has a number of repos with github actions that run on a schedule. Often, these actions are doing work that involves updating a non-default branch, but don’t necessarily make any changes to the default branch.
Github says:
Updates to non-default branches does not count as "repository activity", so our scheduled actions are frequently being disabled. There’s no notification when an action is automatically disabled – it just stops running, and needs to be manually restarted.
Proposal
There are a few different ways to tackle this:
https://github.com/codeforIATI/status/issues/2 is somewhat related.