Skip to content

Commit 0ef9f40

Browse files
authored
Merge pull request #291 from per1234/template-workflow-dependabot
Directly maintain template workflow dependencies via Dependabot
2 parents bfaf829 + a7a9269 commit 0ef9f40

39 files changed

+8
-3824
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ updates:
66
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/dependabot/README.md
77
# See: https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
88
- package-ecosystem: github-actions
9-
directory: / # Check the repository's workflows under /.github/workflows/
9+
directory: /.github/workflows/
1010
schedule:
1111
interval: daily
1212
labels:
@@ -16,12 +16,9 @@ updates:
1616

1717
# Configure check for outdated GitHub Actions actions in workflow templates.
1818
- package-ecosystem: github-actions
19-
# The workflows under the .github/workflows/ subfolder of this path will be checked.
20-
directory: /workflow-templates/dependabot/workflow-template-copies/
19+
directory: /workflow-templates/
2120
schedule:
2221
interval: daily
23-
commit-message:
24-
prefix: (DO NOT MERGE)
2522
labels:
2623
- "topic: infrastructure"
2724
assignees:

.github/workflows/check-dependabot-sync.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
[![Check npm status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-npm-task.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-npm-task.yml)
1111
[![Check General Formatting status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-general-formatting-task.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-general-formatting-task.yml)
1212
[![Check License status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-license.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-license.yml)
13-
[![Check Workflow Duplicates Sync status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-dependabot-sync.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-dependabot-sync.yml)
1413
[![Check CI Workflows Sync status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-ci-sync.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-ci-sync.yml)
1514
[![Check Community Health Files Sync status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-community-health-sync.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-community-health-sync.yml)
1615
[![Check Configuration Files Sync status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-config-sync.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-config-sync.yml)

Taskfile.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ tasks:
4242
deps:
4343
- task: ci:sync
4444
- task: config:sync
45-
- task: dependabot:sync
4645
- task: general:correct-spelling
4746
- task: general:format-prettier
4847
- task: github:sync
@@ -371,22 +370,6 @@ tasks:
371370
-s "{{.SCHEMA_PATH}}" \
372371
-d "{{.PROJECT_FOLDER}}/{{.DATA_PATH}}"
373372
374-
dependabot:sync:
375-
desc: Sync workflow duplicates for dependabot checks
376-
vars:
377-
WORKFLOW_TEMPLATES_PATH: "./workflow-templates"
378-
WORKFLOW_TEMPLATE_COPIES_PATH: "./workflow-templates/dependabot/workflow-template-copies/.github/workflows"
379-
cmds:
380-
# Sync workflow templates with the copies in the folder where Dependabot can check them for updates.
381-
- mkdir --parents "{{.WORKFLOW_TEMPLATE_COPIES_PATH}}"
382-
- rm --force "{{.WORKFLOW_TEMPLATE_COPIES_PATH}}"/*
383-
- |
384-
find "{{.WORKFLOW_TEMPLATES_PATH}}" \
385-
-maxdepth 1 \
386-
-type f \
387-
-regex '.*\.ya?ml' \
388-
-exec cp '{}' "{{.WORKFLOW_TEMPLATE_COPIES_PATH}}" \;
389-
390373
docs:generate:
391374
desc: Create all generated documentation content
392375
# This is an "umbrella" task used to call any documentation generation processes the project has.

workflow-templates/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Addition of, or requests for, any additional workflows that can be reusable betw
2323

2424
## Dependabot
2525

26-
Dependabot is used to check for outdated action versions used in the workflow templates. Details about that are [here](dependabot/README.md).
26+
Dependabot is used to [check for outdated action versions](https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot) used in the template workflows.
27+
28+
Dependabot's PRs will occasionally try to pin to the patch version of the action (e.g., updating `uses: foo/bar@v1` to `uses: foo/bar@v2.3.4`). When the action author has [provided a major version ref](https://docs.github.com/actions/creating-actions/about-custom-actions#using-release-management-for-actions), 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.
29+
30+
---
2731

2832
The same can be done for the workflows of any repository. See the instructions [here](assets/dependabot/README.md).

workflow-templates/assets/dependabot/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ updates:
66
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/dependabot/README.md
77
# See: https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
88
- package-ecosystem: github-actions
9-
directory: / # Check the repository's workflows under /.github/workflows/
9+
directory: /.github/workflows/
1010
schedule:
1111
interval: daily
1212
labels:

workflow-templates/dependabot/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

workflow-templates/dependabot/workflow-template-copies/.github/workflows/check-action-metadata-task.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

workflow-templates/dependabot/workflow-template-copies/.github/workflows/check-certificates.yml

Lines changed: 0 additions & 168 deletions
This file was deleted.

0 commit comments

Comments
 (0)