File tree Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Expand file tree Collapse file tree 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 7
7
- " leetcode/src/**.c"
8
8
jobs :
9
9
build :
10
+ if : github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.
10
11
runs-on : ubuntu-latest
11
12
steps :
12
13
- uses : actions/checkout@v3
@@ -21,17 +22,21 @@ jobs:
21
22
- name : Write LeetCode DIRECTORY.md
22
23
run : |
23
24
python3 scripts/leetcode_directory_md.py 2>&1 | tee leetcode/DIRECTORY.md
24
- - name : Commit and push changes
25
- uses : stefanzweifel/git-auto-commit-action@v4
26
- id : commit-push
27
- with :
28
- commit_message : " docs: updating `leetcode/DIRECTORY.md`"
29
- branch : " leetcode-directory-${{ github.sha }}"
30
- create_branch : true
31
- - name : Creating and merging the PR
25
+ - name : Setup Git configurations
26
+ shell : bash
27
+ run : |
28
+ git config --global user.name github-actions[bot]
29
+ git config --global user.email '[email protected] '
30
+ - name : Committing changes
31
+ shell : bash
32
+ run : |
33
+ git checkout -b leetcode-directory-${{ github.sha }}
34
+ git commit -m "docs: updating `leetcode/DIRECTORY.md`
35
+ git push origin leetcode-directory-${{ github.sha }}:leetcode-directory-${{ github.sha }}
36
+ - name : Creating the pull request
32
37
shell : bash
33
- if : steps.commit-push.outputs.changes_detected == 'true'
34
38
run : |
39
+ if [[ `git status --porcelain` ]]; then
35
40
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).'
36
41
env :
37
42
GH_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 107
107
* [ Queue] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/queue/queue.c )
108
108
* [ Stack] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/stack.c )
109
109
* Stack
110
+ * [ Dynamic Stack] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/stack/dynamic_stack.c )
110
111
* [ Main] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/stack/main.c )
111
112
* [ Parenthesis] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/stack/parenthesis.c )
112
113
* [ Stack] ( https://github.com/TheAlgorithms/C/blob/HEAD/data_structures/stack/stack.c )
You can’t perform that action at this time.
0 commit comments