mirror of
https://github.com/coredns/coredns.git
synced 2026-07-10 17:50:12 -04:00
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: Verify Generated Files
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
verify-generate:
|
|
name: Verify make gen
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
|
with:
|
|
go-version-file: .go-version
|
|
- name: Run make gen
|
|
run: make gen
|
|
- name: Check for uncommitted changes
|
|
run: |
|
|
UNTRACKED=$(git ls-files --others --exclude-standard)
|
|
if [ -n "$UNTRACKED" ]; then
|
|
echo "ERROR: make gen produced untracked files:"
|
|
echo "$UNTRACKED"
|
|
echo ""
|
|
echo "Run 'make gen' and commit the result."
|
|
exit 1
|
|
fi
|
|
if ! git diff --exit-code; then
|
|
echo ""
|
|
echo "ERROR: Generated files are out of date."
|
|
echo "Run 'make gen' and commit the result."
|
|
exit 1
|
|
fi
|