Closed Aldaviva closed 1 year ago
curl -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/Aldaviva/GamesDoneQuickCalendarFactory/actions/workflows
{
"total_count": 2,
"workflows": [
{
"id": 44810729,
"node_id": "W_kwDOHikfXs4Cq8Hp",
"name": "Compile program",
"path": ".github/workflows/compile.yml",
"state": "active",
"created_at": "2023-01-07T07:50:35.000Z",
"updated_at": "2023-01-07T07:50:35.000Z",
"url": "https://api.github.com/repos/Aldaviva/GamesDoneQuickCalendarFactory/actions/workflows/44810729",
"html_url": "https://github.com/Aldaviva/GamesDoneQuickCalendarFactory/blob/master/.github/workflows/compile.yml",
"badge_url": "https://github.com/Aldaviva/GamesDoneQuickCalendarFactory/workflows/Compile%20program/badge.svg"
},
{
"id": 44810730,
"node_id": "W_kwDOHikfXs4Cq8Hq",
"name": "Publish calendar",
"path": ".github/workflows/generate.yml",
"state": "active",
"created_at": "2023-01-07T07:50:35.000Z",
"updated_at": "2023-01-07T07:50:35.000Z",
"url": "https://api.github.com/repos/Aldaviva/GamesDoneQuickCalendarFactory/actions/workflows/44810730",
"html_url": "https://github.com/Aldaviva/GamesDoneQuickCalendarFactory/blob/master/.github/workflows/generate.yml",
"badge_url": "https://github.com/Aldaviva/GamesDoneQuickCalendarFactory/workflows/Publish%20calendar/badge.svg"
}
]
}
Annual schedule changes are too unpredictable. For example, SGDQ 2022 started in June, but in 2023 it starts in May. Cron jobs are not up to this level of variation.
Fixed by d777d6f047d94541b3510e2e7f728e142ee24c71, in which the program was converted into a webapp that generates and serves the ICS file on demand, instead of generating it periodically when we think GDQ is happening.
In a public repository, scheduled workflows are automatically disabled when no repository activity has occurred in 60 days.
— GitHub Actions/Using workflows/Disabling and enabling a workflow
After almost three months with no commits, GitHub showed a warning on the Publish Calendar workflow page that the workflow was going to be disabled unless there was repository activity or I clicked a button.
This is inconvenient because it will be confusing for viewers of this iCalendar file when it's mysteriously out-of-date while a new GDQ event is running. This repository doesn't need new commits or other activity to justify running the workflows because the calendar needs to be rebuilt when external data changes (the GDQ calendar), not when the repository contents change. The code is reusable across events because it's written generically, so we don't need to commit every time a new event starts.
Maybe making an action that commits something to the repo would be enough? Another possibility might be using an external API client in a scheduled task to do the equivalent of pressing the button in the workflow warning.