Skip to content

NJK Manőver Pontok #242

NJK Manőver Pontok

NJK Manőver Pontok #242

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