Skip to content

Commit f0ed27e

Browse files
authored
Merge pull request #7 from per1234/dependabot-sync
Use a dedicated workflow for each sync type
2 parents 051bb95 + e3d9303 commit f0ed27e

File tree

3 files changed

+47
-42
lines changed

3 files changed

+47
-42
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This repository contains intentionally duplicated copies of template workflows under
2+
# workflow-templates/dependabot/workflow-template-copies used for Dependabot checks.
3+
#
4+
# This workflow checks that the copies are in sync.
5+
# If the workflow fails, run `task fix` and commit.
6+
7+
name: Check Workflow Duplicates Sync
8+
9+
on:
10+
push:
11+
paths:
12+
- ".github/workflows/check-dependabot-sync.ya?ml"
13+
- "Taskfile.yml"
14+
- "workflow-templates/*.ya?ml"
15+
- "workflow-templates/dependabot/workflow-template-copies/.github/workflows/*"
16+
pull_request:
17+
paths:
18+
- ".github/workflows/check-dependabot-sync.ya?ml"
19+
- "Taskfile.yml"
20+
- "workflow-templates/*.ya?ml"
21+
- "workflow-templates/dependabot/workflow-template-copies/.github/workflows/*"
22+
23+
jobs:
24+
check-sync:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v2
30+
31+
- name: Install Task
32+
uses: arduino/setup-task@v1
33+
with:
34+
repo-token: ${{ secrets.GITHUB_TOKEN }}
35+
version: 3.x
36+
37+
- name: Sync workflows
38+
run: task --silent dependabot:sync
39+
40+
- name: Check workflow duplicates sync
41+
run: |
42+
git add .
43+
if ! git diff --color --exit-code HEAD; then
44+
echo "::error::Workflow duplicates are out of sync. Please run \"task fix\""
45+
exit 1
46+
fi

.github/workflows/check-sync.yml

-41
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Check Configuration Files status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-configuration-files.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-configuration-files.yml)
44
[![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)
5-
[![Check File Duplicates Sync status](https://github.com/arduino/tooling-project-assets/actions/workflows/check-sync.yml/badge.svg)](https://github.com/arduino/tooling-project-assets/actions/workflows/check-sync.yml)
5+
[![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)
66

77
The [Arduino](https://www.arduino.cc/) Tooling Team's collection of reusable project infrastructure assets.
88

0 commit comments

Comments
 (0)