DRAFT: dev-plan workflow #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Destroy Dev Deployment | |
on: | |
pull_request: | |
types: [labeled] | |
env: | |
TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TERRAFORM_API_TOKEN }} | |
ORGANIZATION: science-and-design | |
PROJECT: Hush Line Dev | |
jobs: | |
deploy: | |
if: ${{ github.event.label.name == 'destroy' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout terraform | |
uses: actions/checkout@v4 | |
with: | |
repository: 'scidsg/hushline-infra' | |
ref: dev-deploy | |
token: ${{ secrets.HUSHLINE_INFRA_TOKEN }} | |
- name: destroy worspace | |
uses: dflook/[email protected] | |
with: | |
path: terraform/dev | |
workspace: dev-${{ github.head_ref }} | |
variables: | | |
tag = "latest" | |
name = "hushline-${{ github.head_ref }}" | |
- name: remove labels | |
uses: actions-ecosystem/[email protected] | |
with: | |
github_token: ${{ github.token }} | |
labels: | | |
deploy | |
destroy | |