mirror of
https://github.com/immich-app/immich.git
synced 2026-05-20 23:02:32 -04:00
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
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@caa599d954228439ea3e8ce1c3328f41ab120ee6 # create-workflow-token-action-v2.0.0
|
|
with:
|
|
client-id: ${{ secrets.PUSH_O_MATIC_APP_CLIENT_ID }}
|
|
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
token: ${{ steps.token.outputs.token }}
|
|
|
|
- name: Setup Mise
|
|
uses: immich-app/devtools/actions/use-mise@7b8610a904d57da241e4ddba17fa62b62b15aed4 # use-mise-action-v2.0.2
|
|
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@0135acd12ad9f3369b94a2aa3c0ae8c835a4e926 # sticky-comment-action-v1.0.0
|
|
with:
|
|
id: docs-pr-url
|
|
token: ${{ steps.token.outputs.token }}
|
|
delete: true
|