City-Bureau / city-scrapers

Scrape, standardize and share public meetings from local government websites
https://cityscrapers.org
MIT License
332 stars 311 forks source link

⚙️ Prevent github workflow deactivation #1058

Closed SimmonsRitchie closed 9 months ago

SimmonsRitchie commented 9 months ago

What's this PR do?

Adds an extra step to our scheduled scrape workflow (named "cron") that will automatically create a dummy commit in the repo if the last commit to the repo was 50 days ago.

Why are we doing this?

We recently discovered that workflows in a number of our city-scraper repos were disabled by Github because there had been no commits in 60 days. Adding this extra step to our workflow using a third party Github action called keepalive-workflow should prevent that.

Steps to manually test

I manually triggered our cron workflow from this branch (keepalive) in order to ensure the workflow executed and didn't causing unexpected problems. Here's the output. If you wish to replicate, do the following. Keep in mind the workflow will take about an hour to run:

1) Manually trigger our cron workflow from the Github Actions page using the "keepalive" branch. 2) Monitor the output. Ensure that the scrape executes without error 3) Ensure that keepalive-workflow doesn't throw any errors and appears to execute.

image

Are there any smells or added technical debt to note?

image

SimmonsRitchie commented 9 months ago

Thank you for the review, @lamle-ea! I'll merge and begin implementing this for our other city-scraper repos.