From bedf5a83cb0c3327ed824144b0288918471e13cf Mon Sep 17 00:00:00 2001 From: Alexander Amiri Date: Wed, 18 Mar 2026 00:20:08 +0100 Subject: [PATCH] Fix tf-plan: checkout PR head branch, not merge ref Same fix as expand-terraform (PR #89). When expand pushes regenerated files to the PR branch, tf-plan must checkout the updated branch HEAD, not the stale merge ref captured at workflow trigger time. --- .github/workflows/tf-plan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tf-plan.yml b/.github/workflows/tf-plan.yml index 484ee54..307b79d 100644 --- a/.github/workflows/tf-plan.yml +++ b/.github/workflows/tf-plan.yml @@ -51,7 +51,7 @@ jobs: - uses: actions/checkout@v6 with: - ref: ${{ github.ref }} + ref: ${{ github.head_ref || github.ref }} - uses: hashicorp/setup-terraform@v4 with: