-
Notifications
You must be signed in to change notification settings - Fork 156
51 lines (43 loc) · 1.21 KB
/
update_module_info.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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