-
Notifications
You must be signed in to change notification settings - Fork 0
Garbage Collection Question #9
Comments
The garbage collection runs whenever the workflow is triggered -- this currently happens whenever a commit is pushed to a Pull Request or the As long as we keep pushing code to the Runn repo it will keep cleaning up the old apps.
That's correct. |
I guess we can't run a github action on close that would just find the closed PR and remove it? Probably not really a big deal to Runn this all the time, as it should be fast. |
I don't think we can hook into the "pull request closed" event -- but what we can do is schedule it as a separate workflow that runs once a day. Notes on scheduling actions: https://jasonet.co/posts/scheduled-actions/ |
I had a read through the docs and it seems like it might actually be possible to hook into the "closed" event for pull requests. I'll try it out. Docs: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request |
Does this code run on every PR creation? Every PR close? Every change? At certain intervals?
It looks like go through all the apps, and remove any that don't have PRs anymore?
deploy-to-heroku-action/src/garbage-collect-heroku-apps.ts
Lines 9 to 44 in 3a095dd
The text was updated successfully, but these errors were encountered: