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
|
|
|
|
|
|
|
|
container: qmkfm/qmk_cli
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2023-01-05 00:39:23 +00:00
|
|
|
- name: Install python reqs
|
|
|
|
run: |
|
|
|
|
python3 -m pip install -r requirements.txt
|
|
|
|
|
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)"
|