-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (36 loc) · 1.17 KB
/
check-config-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
# This repository contains intentionally duplicated copies of template configuration files in use for this repository's
# own purposes
#
# This workflow checks that the copies are in sync.
# If the workflow fails, run `task fix` and commit.
name: Check Configuration Files Sync
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
push:
pull_request:
schedule:
# Run periodically to catch breakage caused by external changes.
- cron: "0 15 * * WED"
workflow_dispatch:
repository_dispatch:
jobs:
check-sync:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Sync files
run: task --silent config:sync
- name: Check file duplicates sync
run: |
git add .
if ! git diff --color --exit-code HEAD; then
echo "::error::File duplicates are out of sync. Please run \"task fix\""
exit 1
fi