[VAULT-20630] CI: Fix the CI workflow issue where we check out base ref instead of the ref that triggered the workflow run (#23453)

This commit is contained in:
Kuba Wieczorek
2023-10-03 12:06:44 +01:00
committed by GitHub
parent 32059ab250
commit b300d50799

View File

@@ -63,7 +63,7 @@ jobs:
# control checking out head instead of base ref by a GH label
# if checkout-head label is added to a PR, checkout HEAD otherwise checkout base_ref
- if: ${{ !contains(github.event.pull_request.labels.*.name, 'checkout-head') }}
run: echo "CHECKOUT_REF=${{ github.base_ref }}" >> "$GITHUB_ENV"
run: echo "CHECKOUT_REF=${{ github.ref }}" >> "$GITHUB_ENV"
- if: ${{ contains(github.event.pull_request.labels.*.name, 'checkout-head') }}
run: echo "CHECKOUT_REF=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_ENV"
- id: checkout-ref-output