-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.42 KB
/
update_fegyverek_json.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
52
53
54
55
56
57
name: Fegyver md tables to json
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13.0'
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install natsort
# Install dependencies if requirements.txt exists
# if [ -f "requirements.txt" ]; then pip install -r requirements.txt; fi
- name: Execute md_table_to_json.py
run: python code/md_table_to_json.py
- name: Check for Changes
run: |
if [[ $(git status --porcelain) ]]; then
echo "files_modified=true" > $GITHUB_ENV
else
echo "files_modified=false" > $GITHUB_ENV
fi
- name: Configure Git
if: ${{ env.files_modified == 'true' }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit Changes
if: ${{ env.files_modified == 'true' }}
run: |
git add .
git commit -m "GitHub Action: md_table_to_json.py"
- name: Push Changes
if: ${{ env.files_modified == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push