From 6279cb5b4c0eb926b076acf316c4635695c08aab Mon Sep 17 00:00:00 2001 From: Denis Anikiev Date: Thu, 10 Sep 2026 16:56:32 +0300 Subject: [PATCH] Refactor checkout step in validate-zenodo workflow to clarify ref handling --- .github/workflows/validate-zenodo.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-zenodo.yml b/.github/workflows/validate-zenodo.yml index db40e37..442d285 100644 --- a/.github/workflows/validate-zenodo.yml +++ b/.github/workflows/validate-zenodo.yml @@ -27,7 +27,12 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - ref: ${{ inputs.ref || github.ref }} + # Only override the ref when one is supplied by workflow_call or + # workflow_dispatch. Leaving it empty for push and pull_request lets + # actions/checkout resolve the event itself, pinning github.sha as well + # as the ref name. Passing refs/pull//merge explicitly breaks as soon + # as the pull request is merged, because GitHub deletes that ref. + ref: ${{ inputs.ref }} - name: Validate Zenodo Metadata uses: vsoch/zenodo-validator@main