Skip to content

Generate YML Files from current READMEs #2

Generate YML Files from current READMEs

Generate YML Files from current READMEs #2

# name to display in GitHub Actions
name: Generate YML Files from current READMEs
on:
# Allows to manually run the job
workflow_dispatch:
#push:
# branches:
# - main
jobs:
generate-readme-files:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PyYAML
run: pip install pyyaml
- name: Run Python script
run: python .github/workflows/scripts/generate-yml-files.py
- name: Commit changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "Updated Readme Files" || exit 0
git push origin ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}