Skip to content

Check Community Health Files Sync #405

Check Community Health Files Sync

Check Community Health Files Sync #405

# This repository contains intentionally duplicated copies of GitHub community health 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 Community Health Files Sync
# See: https://docs.github.com/actions/reference/workflows-and-actions/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-community-health-sync.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
- "documentation-templates/**"
- "issue-templates/**"
pull_request:
paths:
- ".github/workflows/check-community-health-sync.ya?ml"
- "go.mod"
- "go.sum"
- "Taskfile.ya?ml"
- ".github/ISSUE_TEMPLATE/**"
- "docs/**"
- "documentation-templates/**"
- "issue-templates/**"
schedule:
# Run periodically to catch breakage caused by external changes.
- cron: "0 14 * * WED"
workflow_dispatch:
repository_dispatch:
jobs:
check-sync:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Sync files
run: |
go tool \
github.com/go-task/task/v3/cmd/task \
--silent \
github: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