Merge pull request #922 from Johann-PLW/main #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Module Info | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'scripts/artifacts/**' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
update-module-info: | |
# Only run on the main repository, not on forks | |
if: github.repository == 'abrignoni/iLEAPP' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Run documentation scripts | |
run: | | |
python admin/scripts/device_info_values.py | |
python admin/scripts/module_info.py | |
- name: Check for changes | |
id: git-check | |
run: | | |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT | |
- name: Commit changes | |
if: steps.git-check.outputs.changes == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add admin/docs/device_info_values.md | |
git add admin/docs/module_info.md | |
git commit -m "Update documentation files" | |
- name: Push changes | |
if: steps.git-check.outputs.changes == 'true' | |
run: | | |
git push |