Skip to content

Commit

Permalink
Merge pull request #317 from ministryofjustice/ga-trigger-fix
Browse files Browse the repository at this point in the history
EL-1621 update trigger for Github Action STG deletion
  • Loading branch information
willc-work authored Jul 17, 2024
2 parents 812fd1c + d9f90bf commit 55e5fbd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/actions/delete-uat-release/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Delete UAT deployment"
description: 'Deletes a UAT deployment with a name that matches the merged or closed branch'
description: 'Deletes a FALA UAT/Staging deployment with a name that matches the merged or closed branch'
inputs:
k8s_cluster:
description: "Kubernetes cluster name"
Expand Down Expand Up @@ -36,9 +36,10 @@ runs:
env:
BRANCH_NAME: ${{ inputs.branch_name || 'not_given' }}
run: |
echo "This is the branch name $BRANCH_NAME"
if [ $BRANCH_NAME == "not_given" ]
then
if [ $GITHUB_EVENT_NAME == "pull_request" ]
if [ $GITHUB_EVENT_NAME == "pull_request_target" ]
then
branch=$GITHUB_HEAD_REF
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/delete_uat_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Delete from UAT namespace
- name: Delete from STAGING namespace
id: delete_uat
uses: ./.github/actions/delete-uat-release
with:
Expand Down

0 comments on commit 55e5fbd

Please sign in to comment.