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