From e9c41e3cedacbb4d97aec36c36d66834923e698e Mon Sep 17 00:00:00 2001 From: Graham Savage Date: Wed, 1 Jul 2026 10:14:36 +0100 Subject: [PATCH] Try to use input ref for drift detection plan file If the caller of the apply workflow supplied a ref as input then we need to use that when creating the drift file. --- .github/workflows/apply.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/apply.yml b/.github/workflows/apply.yml index 5446f22..4fe9bd6 100644 --- a/.github/workflows/apply.yml +++ b/.github/workflows/apply.yml @@ -137,7 +137,7 @@ jobs: - name: Create drift plan run: | - jq -n --arg sha "${{ github.event.pull_request.head.sha || github.sha }}" --arg account "$AWS_ACCOUNT_ID" '{sha: $sha, drift: false, aws_account_id: $account}' > /tmp/drift.plan.json + jq -n --arg sha "${{ inputs.ref || github.event.pull_request.head.sha || github.sha }}" --arg account "$AWS_ACCOUNT_ID" '{sha: $sha, drift: false, aws_account_id: $account}' > /tmp/drift.plan.json - name: Upload drift plan to S3 run: |