-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (33 loc) · 1.16 KB
/
check-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
# This repository contains intentionally duplicated copies of files:
# - Workflow template copies under workflow-templates/dependabot/workflow-template-copies used for Dependabot checks.
# - Workflow template copies in .github/workflows used for this repository's own CI system.
# - Assets for the workflow templates used in this repository.
#
# This workflow checks that the copies are in sync.
# If the workflow fails, run `task dependabot:sync` and commit.
name: Check File Duplicates Sync
on:
push:
pull_request:
jobs:
check-sync:
runs-on: ubuntu-latest
env:
SYNC_COMMAND: task dependabot:sync
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Task
uses: arduino/setup-task@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: 3.x
- name: Sync files
run: ${{ env.SYNC_COMMAND }} --silent
- 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 \"${{ env.SYNC_COMMAND }}\""
exit 1
fi