mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
2da98db4a7
* updating DIRECTORY.md * Update directory_writer.yml Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
23 lines
817 B
YAML
23 lines
817 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
|
|
- uses: actions/setup-python@v1
|
|
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 "actions@github.com"
|
|
git commit -am "updating DIRECTORY.md" || true
|
|
- name: Push DIRECTORY.md
|
|
if: github.ref == 'refs/heads/master'
|
|
run: |
|
|
git push "https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/$GITHUB_REPOSITORY.git" ${master} --force
|