diff --git a/.github/workflows/pr_create_dynamic_env.yaml b/.github/workflows/pr_create_dynamic_env.yaml index 256d77e..f8d3f4b 100644 --- a/.github/workflows/pr_create_dynamic_env.yaml +++ b/.github/workflows/pr_create_dynamic_env.yaml @@ -27,7 +27,7 @@ jobs: --arg targetAccountGroup "nhs-notify-iam-dev" \ --arg targetComponent "branch" \ --arg terraformAction "apply" \ - --arg overrides "branch_name=${{ github.ref_name }}" \ + --arg overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \ '{ "ref": "main", "inputs": { "infraRepoName": $infraRepoName,