Skip to content

Destroy feature environment #2

Destroy feature environment

Destroy feature environment #2

name: Destroy feature environment
on:
workflow_dispatch:
delete:
concurrency:
group: deploy-feature-${{ github.ref }}
cancel-in-progress: true
jobs:
destroy:
runs-on: ubuntu-latest
if: (github.event.ref_type == 'branch' && startsWith(github.event.ref, 'feature/')) || startsWith(github.ref_name, 'feature/')
steps:
- uses: actions/checkout@v4
- name: Get environment name
id: get-environment
run: echo "ENVIRONMENT=$(echo "${{ github.ref_name }}" | sed -e 's,/,-,g')" >> "$GITHUB_OUTPUT"
- name: Destroy
run: echo "Destroy feature environment ${{ steps.get-environment.outputs.ENVIRONMENT }}"