diff --git a/.github/workflows/dev_destroy.yml b/.github/workflows/dev_destroy.yml index 50ae9685..5f7b959c 100644 --- a/.github/workflows/dev_destroy.yml +++ b/.github/workflows/dev_destroy.yml @@ -1,9 +1,9 @@ --- -name: Create Dev Deployment +name: Destroy Dev Deployment on: pull_request: - types: [unlabeled] + types: [labeled] env: TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TERRAFORM_API_TOKEN }} @@ -12,7 +12,7 @@ env: jobs: deploy: - if: ${{ github.event.label.name == 'dev-deploy' }} + if: ${{ github.event.label.name == 'destroy' }} runs-on: ubuntu-latest steps: - name: checkout terraform @@ -28,3 +28,11 @@ jobs: path: terraform/dev workspace: dev-${{ github.head_ref }} + - name: remove labels + uses: actions-ecosystem/action-remove-labels@v1.3.0 + with: + github_token: ${{ github.token }} + labels: | + deploy + destroy +