From 8a3ff966e74f61b6ce75e174424a6939fb0451a7 Mon Sep 17 00:00:00 2001 From: David Leal Date: Wed, 14 Jun 2023 10:18:38 -0600 Subject: [PATCH] chore: run LeetCode directory writer on `main` only --- .github/workflows/leetcode_directory_writer.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/leetcode_directory_writer.yml b/.github/workflows/leetcode_directory_writer.yml index e6d666ce..8758df4f 100644 --- a/.github/workflows/leetcode_directory_writer.yml +++ b/.github/workflows/leetcode_directory_writer.yml @@ -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. @@ -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 }}