fix: Add upload artifact to on-pull-request to save PR number for later auto-merge #178
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.
Description of your changes
PR #169 introduced a workflow to auto-merge PRs from Dependabot which didn't work. The new workflow depended on the existence of an artefact created & saved from the previous workflow.
This is the recommended way to share data between workflows/jobs and uses a mechanism of upload & download artefact files between different workflows/jobs. In the previous PR I introduced the download part but since there was no upload, and the workflow depended on the existence of an artefact to find the PR number, the
auto-merge
job failed.This PR introduces a new job/step in the
on-pull-request
workflow that should be executed only when the actor isdependabot
and that should create a file with the PR number and upload it as an artefact. This artefact would then be used by theauto-merge
workflow to merge.How to verify this change
If the change is effective, re-running the
on-pull-request
workflow for an existing PR opened bydependabot
should cause the PR to be merged. Same applies to a newdependabot
PR.Related issues, RFCs
#169
#126
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist
Breaking change checklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.