Files
data.immich.app/.github/workflows/destroy.yml
T
renovate[bot] b1f824d512 chore(deps): update github-actions (#334)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-05-27 23:36:46 -04:00

50 lines
1.6 KiB
YAML

name: Destroy
on:
pull_request_target:
types: [closed]
env:
tofu_version: '1.10.2'
tg_version: '0.83.0'
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment: [ 'dev', 'prod' ]
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install 1Password CLI
uses: 1password/install-cli-action@8d006a0d0a4fd505af7f7ce589e7f768385ff5e4 # v3.0.0
- name: Install Terragrunt
uses: eLco/setup-terragrunt@d6093fd3d1e651013c072facb41d488602b85fbf # v1.0.4
with:
terragrunt_version: ${{ env.tg_version }}
- name: 'Install OpenTofu'
uses: opentofu/setup-opentofu@847eaa4afeb791b06daa46e8eafa8b1b68d7cfb4 # v2.0.1
with:
tofu_version: ${{ env.tofu_version }}
tofu_wrapper: false
- name: Destroy All
working-directory: ${{ env.working_dir }}
env:
ENVIRONMENT: ${{ matrix.environment }}
TF_VAR_dist_dir: ${{ github.workspace }}/dist
TF_VAR_stage: pr-${{ github.event.number }}
OP_SERVICE_ACCOUNT_TOKEN: ${{ matrix.environment == 'prod' && secrets.OP_TF_PROD_ENV || secrets.OP_TF_DEV_ENV }}
working_dir: 'deployment'
run: op run --env-file=".env" -- terragrunt run --all destroy --non-interactive -- -refresh=false
- name: Comment
uses: immich-app/devtools/actions/sticky-comment@0135acd12ad9f3369b94a2aa3c0ae8c835a4e926 # sticky-comment-action-v1.0.0
with:
id: web-pr-url
delete: true