Python/.github/workflows/directory_writer.yml
Christian Clauss 0a0f4986e4
Upgrade GitHub Actions (#6236)
* Upgrade GitHub Actions

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-07-07 05:25:25 +02:00

24 lines
897 B
YAML

# The objective of this GitHub Action is to update the DIRECTORY.md file (if needed)
# when doing a git push
name: directory_writer
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1 # v1, NOT v2 or v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Write DIRECTORY.md
run: |
scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Update DIRECTORY.md
run: |
git add DIRECTORY.md
git commit -am "updating DIRECTORY.md" || true
git push --force origin HEAD:$GITHUB_REF || true