Skip to content

Commit

Permalink
LPAL-1323: update destroy to branch-name (#2162)
Browse files Browse the repository at this point in the history
* LPAL-1323: update destroy to branch-name

* add missing output
  • Loading branch information
jay-whitwell authored Oct 18, 2024
1 parent ab15f7f commit 5bd5a60
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/workflow_destroy_on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ on:

jobs:
workspace_name:
uses: ministryofjustice/opg-github-workflows/.github/workflows/data-parse-workspace.yml@bd6ac6106a4adda64cecefa3632fb64ab0ddab4b # v1.36.0
runs-on: ubuntu-latest
outputs:
safe_branch_name: ${{ steps.safe_branch_name.outputs.safe }}
steps:
- name: Set safe branch name
id: safe_branch_name
uses: ministryofjustice/opg-github-actions/.github/actions/[email protected]
with:
length: "15"
if: github.event.pull_request.merged == true

cleanup_workspace:
Expand Down Expand Up @@ -73,4 +81,4 @@ jobs:
env:
TF_VAR_pagerduty_token: ${{ secrets.PAGERDUTY_TOKEN }}
run: |
../../scripts/pipeline/workspace_cleanup/destroy_workspace.sh ${{ needs.workspace_name.outputs.name }}
../../scripts/pipeline/workspace_cleanup/destroy_workspace.sh ${{ needs.workspace_name.outputs.safe_branch_name }}

0 comments on commit 5bd5a60

Please sign in to comment.