mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
Merge branch 'master' into dynamic_programming_cmake
This commit is contained in:
commit
c7472083e7
23
.github/workflows/leetcode_directory_writer.yml
vendored
23
.github/workflows/leetcode_directory_writer.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
- "leetcode/src/**.c"
|
- "leetcode/src/**.c"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
if: github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -21,17 +22,21 @@ jobs:
|
|||||||
- name: Write LeetCode DIRECTORY.md
|
- name: Write LeetCode DIRECTORY.md
|
||||||
run: |
|
run: |
|
||||||
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
|
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
|
||||||
- name: Commit and push changes
|
- name: Setup Git configurations
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
|
||||||
id: commit-push
|
|
||||||
with:
|
|
||||||
commit_message: "docs: updating `leetcode/DIRECTORY.md`"
|
|
||||||
branch: "leetcode-directory-${{ github.sha }}"
|
|
||||||
create_branch: true
|
|
||||||
- name: Creating and merging the PR
|
|
||||||
shell: bash
|
shell: bash
|
||||||
if: steps.commit-push.outputs.changes_detected == 'true'
|
|
||||||
run: |
|
run: |
|
||||||
|
git config --global user.name github-actions[bot]
|
||||||
|
git config --global user.email 'github-actions@users.noreply.github.com'
|
||||||
|
- name: Committing changes
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git checkout -b leetcode-directory-${{ github.sha }}
|
||||||
|
git commit -m "docs: updating `leetcode/DIRECTORY.md`
|
||||||
|
git push origin leetcode-directory-${{ github.sha }}:leetcode-directory-${{ github.sha }}
|
||||||
|
- name: Creating the pull request
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ `git status --porcelain` ]]; then
|
||||||
gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).'
|
gh pr create --base ${GITHUB_REF##*/} --head leetcode-directory-${{ github.sha }} --title 'docs: updating `leetcode/DIRECTORY.md`' --body 'Updated LeetCode directory (see the diff. for changes).'
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
Loading…
Reference in New Issue
Block a user