forked from TheAlgorithms/Rust
-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (23 loc) · 872 Bytes
/
directory_workflow.yml
File metadata and controls
24 lines (23 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: build_directory_md
on: [push, pull_request]
jobs:
MainSequence:
name: DIRECTORY.md
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1 # v2 is broken for git diff
- uses: actions/setup-python@v2
- name: Setup Git Specs
run: |
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: |
python .github/workflows/scripts/build_directory_md.py
- name: Commit DIRECTORY.md
run: |
git add DIRECTORY.md
git commit -m "updating DIRECTORY.md" || true
git diff DIRECTORY.md
git push --force origin HEAD:$GITHUB_REF || true