Skip to content

Commit

Permalink
CCM-5836 fix branch-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenvaines-bjss committed Jul 23, 2024
1 parent 33e0436 commit 03dc419
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr_merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
DISPATCH_EVENT=$(jq -ncM \
--arg infraRepoName "${this_repo_name}" \
--arg releaseVersion "${{ github.ref_name }}" \
--arg releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
--arg targetEnvironment "pr${{ github.event.number }}" \
--arg targetAccountGroup "nhs-notify-iam-dev" \
--arg targetComponent "branch" \
--arg terraformAction "destroy" \
--arg overrides "branch_name=${{ github.ref_name }}" \
--arg overrides "branch_name=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
'{ "ref": "main",
"inputs": {
"infraRepoName": $infraRepoName,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "null_resource" "remove_amplify_branch" {
# Dispite destroying the resouce, apparently Amplify thinks we want to keep the branch resrouce around
triggers = {
csi = local.csi
}

provisioner "local-exec" {
when = destroy
command = "aws amplify delete-branch --app-id ${local.iam.amplify["id"]} --branch-name ${module.amplify_branch.name}"
}
}


0 comments on commit 03dc419

Please sign in to comment.