From ce5c4b64fcf9f57bfafddc24df25bca8cc405e3e Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Thu, 2 May 2024 11:33:43 -0400 Subject: [PATCH 1/2] chore: do not run workflow after merging --- .github/workflows/verify_library_generation.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 8f2520c858..fd352b67a8 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -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: From 0d814dd47e45e03bb62754e75e9e7998618653bb Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Thu, 2 May 2024 13:20:06 -0400 Subject: [PATCH 2/2] move comment --- .github/workflows/verify_library_generation.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/verify_library_generation.yaml b/.github/workflows/verify_library_generation.yaml index 8698f526e5..768325f9f5 100644 --- a/.github/workflows/verify_library_generation.yaml +++ b/.github/workflows/verify_library_generation.yaml @@ -16,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