From b457f7bfef24885a3205c897fbf83a4fbcb00605 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 24 Nov 2026 09:10:03 +0000 Subject: [PATCH] ci: harden update-major-version workflow inputs (#4535) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/update-major-version.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-major-version.yml b/.github/workflows/update-major-version.yml index 164503ff..8c0d32b5 100644 --- a/.github/workflows/update-major-version.yml +++ b/.github/workflows/update-major-version.yml @@ -27,7 +27,9 @@ jobs: git config user.name actions-bot git config user.email actions-bot@users.noreply.github.com - name: Tag new target - run: git tag -f "${INPUT_MAIN_VERSION}" "${INPUT_TARGET}" + run: | + sha=$(git rev-parse --verify --end-of-options "${INPUT_TARGET}^{commit}") + git tag -f "${INPUT_MAIN_VERSION}" "${sha}" env: INPUT_MAIN_VERSION: ${{ github.event.inputs.main_version }} INPUT_TARGET: ${{ github.event.inputs.target }}