Skip to content

Commit

Permalink
chore: run LeetCode directory writer on main only
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 committed Jun 14, 2023
1 parent b6b01a3 commit 8a3ff96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/leetcode_directory_writer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
paths:
- "leetcode/src/**.c"
branches:
- main
jobs:
build:
if: github.repository == 'TheAlgorithms/C' # We only need this to run in our repository.
Expand Down Expand Up @@ -37,6 +39,7 @@ jobs:
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).'
fi
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 8a3ff96

Please sign in to comment.