2023-01-01 01:46:17 +01: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 02:32:09 +01:00
|
|
|
container: ghcr.io/qmk/qmk_cli
|
2023-01-01 01:46:17 +01:00
|
|
|
|
|
|
|
steps:
|
2023-02-28 21:27:11 +01:00
|
|
|
- name: Disable safe.directory check
|
|
|
|
run : git config --global --add safe.directory '*'
|
|
|
|
|
2023-09-05 19:50:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-01-01 01:46:17 +01: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)"
|