-
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 1.03 KB
/
update-manufacturer-file.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
name: Update manufacturer file
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
jobs:
update_manufacturer_file:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r tools/requirements.txt
- name: Make manufacturer file
run: python tools/make-manuf.py
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Update manufacturer file
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Krypton'
git config --global user.email 'root@krypton.ninja'
git commit -am "manuf: Update of `date +'%Y-%m-%d %H:%M:%S'`"
git push