Skip to content

chore: do not run workflow on push #2718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/verify_library_generation.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
on:
push:
branches:
- main
pull_request:
# do not run this workflow when merging the pull request.
types: [opened, reopened, edited, synchronize]
workflow_dispatch:

name: verify_library_generation
jobs:
should-run-library-generation-tests:
Expand All @@ -21,9 +16,11 @@ jobs:
shell: bash
run: |
set -ex
git checkout "${base_ref}" # Checkout a detached head, and then fetch the base ref to populate the detached head.
# Checkout a detached head, and then fetch the base ref to populate the detached head.
git checkout "${base_ref}"
git fetch --no-tags --prune origin +${base_ref}:refs/remotes/origin/${base_ref}
git checkout "${head_ref}" # Checkout a detached head, and then fetch the head ref to populate the detached head.
# Checkout a detached head, and then fetch the head ref to populate the detached head.
git checkout "${head_ref}"
git fetch --no-tags --prune origin +${head_ref}:refs/remotes/origin/${head_ref}
changed_directories="$(git diff --name-only ${base_ref} ${head_ref})"
if [[ ${changed_directories} =~ "library_generation/" ]]; then
Expand Down
Loading