Configure Dependabot to check for outdated actions used in workflows #1605
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.
Motivation
GitHub Actions workflows are an important part of this project's infrastructure.
GitHub Actions actions are used for common tasks in these workflows. The workflows specify a Git ref from the action's repository to indicate which version of the action should be used. These refs have not been maintained, resulting in significantly outdated versions of some actions being used by the workflows.
GitHub is now deprecating the use of the Node.js 12.x runtime by actions:
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
Some of the outdated action versions in use are configured to use this deprecated Node.js. That currently produces warnings on the workflow run summary page, but would eventually result in the complete breakage of the workflows.
Dependabot is the most efficient way to maintain the action dependencies of GitHub Actions workflows, and is already in use for this purpose in >100 of Arduino's repositories.
Change description
Configure Dependabot to periodically check the versions of all actions used in the repository's workflows. If any are found to be outdated, it will submit a pull request to update them.
Other information
NOTE: Dependabot's PRs will occasionally propose to pin to the patch version of the action (e.g., updating
uses: foo/bar@v1
touses: foo/[email protected]
). When the action author has provided a major version ref, use that instead (e.g.,uses: foo/bar@v2
). Once the major version has been updated in the workflow, Dependabot should not submit an update PR again until the next major version bump.So even when the PRs from Dependabot are not exactly correct, they still have value in bringing the maintainer's attention to the fact that the action version in use is outdated. Dependabot will automatically close its PR once the workflow has been updated.
More information:
https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
Reviewer checklist