Skip to content

Configure Dependabot to check for outdated actions used in workflows #1605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2022
Merged

Configure Dependabot to check for outdated actions used in workflows #1605

merged 1 commit into from
Nov 3, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Oct 31, 2022

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 to uses: 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

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

Dependabot will 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.

NOTE: Dependabot's PRs will occasionally propose to pin to the patch version of the action (e.g., updating
`uses: foo/bar@v1` to `uses: foo/[email protected]`). When the action author has provided a major version ref, use that instead
(e.g., `uses: foo/bar@v2`). 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
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Oct 31, 2022
@per1234 per1234 self-assigned this Oct 31, 2022
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work, Per.

Thanks for adding the links to the docs.

@per1234 per1234 merged commit 7d91f2d into arduino:main Nov 3, 2022
@per1234 per1234 deleted the actions-dependabot branch November 3, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants