This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
replace automerge with scheduled workflow living in this repo #477
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #475
Description
This PR proposes replacing individual
automerge.yml
workflows with a singleMerge PRs
workflow which goes over all the reposweb3-bot
has access to and merges PRs created byweb3-bot
if they are ready to be merged once a day.Why?
I want to introduce this change because it's quite wasteful to hoard a runner for the entire duration of CI just for automerge. As described in #475, this could lead to deadlocks in extreme cases.
What are we giving up?
We're increasing the time between workflow being finished successfully and merge to up to 1 day. I think this is acceptable for updates from
web3-bot
but I'd definitely want to hear from you whether you agree.What else changes?
I decided to use
github-script
action for the new/modified workflows. This allowed me to define workflows in inline JS. It could be even better if we turned them into proper JS actions but I think we can leave it until the next time we're investing time in one of these workflows.Testing
I ran the new/modified workflows on
push
while replacing the PR creation/PR merge/workflow deletion withcore.info
log:How to roll it out?
Dispatch
workflowmaster
Delete workflow
workflow with:path
:.github/workflows/automerge.yml
dry-run
:true
Delete workflow
workflow with (*we might need stronger credentials to delete files directly in default branches):path
:.github/workflows/automerge.yml
dry-run
:false
Dispatch
workflow