2023-01-01 00:46:17 +00:00
|
|
|
name: PR Regenerate Files
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'data/constants/**'
|
|
|
|
- 'lib/python/**'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
regen:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-03-17 01:32:09 +00:00
|
|
|
container: ghcr.io/qmk/qmk_cli
|
2023-01-01 00:46:17 +00:00
|
|
|
|
|
|
|
steps:
|
2023-02-28 20:27:11 +00:00
|
|
|
- name: Disable safe.directory check
|
|
|
|
run : git config --global --add safe.directory '*'
|
|
|
|
|
2023-09-05 17:50:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-01 00:46:17 +00:00
|
|
|
|
|
|
|
- name: Run qmk generators
|
|
|
|
run: |
|
|
|
|
util/regen.sh
|
|
|
|
git diff
|
|
|
|
|
|
|
|
- name: Fail when regeneration required
|
|
|
|
run: |
|
|
|
|
git diff
|
|
|
|
for file in $(git diff --name-only); do
|
|
|
|
echo "File '${file}' Requires Regeneration"
|
|
|
|
echo "::error file=${file}::Requires Regeneration"
|
|
|
|
done
|
|
|
|
test -z "$(git diff --name-only)"
|