Skip to content

Commit 8f21be6

Browse files
authored
chore: do not run workflow on push (#2718)
In this PR: - Remove `on.push` trigger so that the workflow doesn't run against a specific branch. Official doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore
1 parent 5d4567f commit 8f21be6

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/verify_library_generation.yaml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
on:
2-
push:
3-
branches:
4-
- main
52
pull_request:
6-
# do not run this workflow when merging the pull request.
7-
types: [opened, reopened, edited, synchronize]
8-
workflow_dispatch:
3+
94
name: verify_library_generation
105
jobs:
116
should-run-library-generation-tests:
@@ -21,9 +16,11 @@ jobs:
2116
shell: bash
2217
run: |
2318
set -ex
24-
git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head.
19+
# Checkout a detached head, and then fetch the base ref to populate the detached head.
20+
git checkout "${base_ref}"
2521
git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref}
26-
git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head.
22+
# Checkout a detached head, and then fetch the head ref to populate the detached head.
23+
git checkout "${head_ref}"
2724
git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref}
2825
changed_directories="$(git diff --name-only ${base_ref} ${head_ref})"
2926
if [[ ${changed_directories} =~ "library_generation/" ]]; then

0 commit comments

Comments
 (0)