name: Docs destroy on: pull_request_target: # zizmor: ignore[dangerous-triggers] no attacker inputs are used here types: [closed] permissions: {} env: TG_NON_INTERACTIVE: 'true' jobs: deploy: name: Docs Destroy runs-on: ubuntu-latest permissions: contents: read pull-requests: write steps: - id: token uses: immich-app/devtools/actions/create-workflow-token@df46d635b905e618b88fc4c95baa920aeb30b309 # create-workflow-token-action-v3.0.1 with: client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }} private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }} permission-contents: read permission-pull-requests: write - name: Checkout code uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false token: ${{ steps.token.outputs.token }} - name: Setup Mise uses: immich-app/devtools/actions/use-mise@caac7f7e4298458a14238959504f411fc6cc7f06 # use-mise-action-v3.2.3 with: github_token: ${{ steps.token.outputs.token }} - name: Destroy Docs Subdomain env: TF_VAR_prefix_name: 'pr-${{ github.event.number }}' TF_VAR_prefix_event_type: 'pr' CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} TF_STATE_POSTGRES_CONN_STR: ${{ secrets.TF_STATE_POSTGRES_CONN_STR }} working-directory: 'deployment/modules/cloudflare/docs' run: 'mise run //deployment:tf destroy -refresh=false' - name: Comment uses: immich-app/devtools/actions/sticky-comment@5f79a5a552b30a23aa7984ffa06c3dbfaf4330f6 # sticky-comment-action-v1.1.0 with: id: docs-pr-url token: ${{ steps.token.outputs.token }} delete: true