Skip to content

Directly maintain template workflow dependencies via Dependabot #291

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 2 commits into from
Nov 24, 2022
Merged

Directly maintain template workflow dependencies via Dependabot #291

merged 2 commits into from
Nov 24, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Nov 24, 2022

Dependabot supports managing GitHub Actions action dependencies of workflows. In addition to the workflows used in the repository's own infrastructure, this system is also used to maintain the dependencies of the "template" workflows.

At the time it was set up, Dependabot had an inconvenient behavior where workflows were expected to be found in the .github/workflows/ subfolder of the path specified via the directory key of the dependabot.yml configuration file. This meant it was not possible to directly scan the workflows in the workflow-templates folder. The workaround was to put a set of copies in workflow-templates/dependabot/workflow-template-copies/.github/workflows/. The Dependabot PRs proposing to update those workflows when an outdated action dependency was detected were not merged, but instead used as a notification of available updates for the source workflows in workflow-templates.

A change in Dependabot in spring of 2022 caused the template maintenance system to stop working (dependabot/dependabot-core#5047). That bug has been fixed (dependabot/dependabot-core#6189). Along with the fix, the odd system of not looking for workflows in the folder specified via the directory key was dropped (dependabot/dependabot-core#6189 (comment)), which means it is now possible to use Dependabot to directly maintain the workflow templates, making the duplicates no longer necessary.


I set up a demonstration of this PR by putting the changes proposed here in place in my fork and downgrading action dependencies in the workflows there to trigger Dependabot PRs:


Fixes #224

Dependabot supports managing GitHub Actions action dependencies of workflows. In addition to the workflows used in the
repository's own infrastructure, this system was also used to maintain the dependencies of the "template" workflows.

At the time it was set up, Dependabot had an inconvenient behavior where workflows were expected to be found in the
`.github/workflows/` subfolder of the path specified via the `directory` key of the `dependabot.yml` configuration file.
This meant it was not possible to directly scan the workflows in the `workflow-templates` folder. The workaround was to
put a set of copies in `workflow-templates/dependabot/workflow-template-copies/.github/workflows/`. The Dependabot PRs
proposing to update those workflows when an outdated action dependency was detected were not merged, but instead used as
a notification of available updates for the source workflows in `workflow-templates`.

A change in Dependabot in spring of 2022 caused the template maintenance system to stop working. That bug has been
fixed. Along with the fix, the odd system of not looking for workflows in the folder specified via the `directory` key
was dropped, which means it is now possible to use Dependabot to directly maintain the workflow templates, making the
duplicates no longer necessary.
Dependabot supports managing GitHub Actions action dependencies of workflows.

Previously, Dependabot had an unintuitive behavior where workflows were expected to be found in the `.github/workflows/`
subfolder of the path specified via the `directory` key of the `dependabot.yml` configuration file, meaning that if you
want Dependabot to check the workflows at `/.github/workflows/`, you had to set `directory: /`.

This odd requirement has now been dropped. Even though backwards compatibility has been provided for `directory: /`
specifically, I think the configuration file is easier to understand with the full path to the workflows set, especially
in repositories (such as this one) where workflows are also present in another path.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: infrastructure Related to project infrastructure labels Nov 24, 2022
@per1234 per1234 self-assigned this Nov 24, 2022
Copy link
Contributor

@MatteoPologruto MatteoPologruto left a comment

Choose a reason for hiding this comment

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

Thanks Per!

@per1234 per1234 merged commit 0ef9f40 into arduino:main Nov 24, 2022
@per1234 per1234 deleted the template-workflow-dependabot branch November 24, 2022 08:00
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: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Template workflow action dependency update system is broken
2 participants