Generate YML Files from current READMEs #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 }} |