mirror of
https://github.com/immich-app/services.git
synced 2026-09-30 13:23:10 +08:00
ci(destroy): add workflow_dispatch and terragrunt retry on all commands (#34)
This commit is contained in:
@@ -2,6 +2,12 @@ name: Destroy PR environment
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'PR number whose pr-<N> stage to destroy in dev + prod'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
TG_NON_INTERACTIVE: 'true'
|
||||
@@ -15,7 +21,7 @@ jobs:
|
||||
environment: ['dev', 'prod']
|
||||
env:
|
||||
ENVIRONMENT: ${{ matrix.environment }}
|
||||
TF_VAR_stage: pr-${{ github.event.number }}
|
||||
TF_VAR_stage: pr-${{ github.event.inputs.pr_number || github.event.number }}
|
||||
TF_VAR_dist_dir: ${{ github.workspace }}/dist
|
||||
TF_VAR_migrations_dir: ${{ github.workspace }}/apps/version/migrations
|
||||
OP_SERVICE_ACCOUNT_TOKEN: ${{ matrix.environment == 'prod' && secrets.OP_TF_PROD_ENV || secrets.OP_TF_DEV_ENV }}
|
||||
|
||||
@@ -10,6 +10,14 @@ remote_state {
|
||||
}
|
||||
}
|
||||
|
||||
errors {
|
||||
retry "transient" {
|
||||
retryable_errors = [".*"]
|
||||
max_attempts = 3
|
||||
sleep_interval_sec = 30
|
||||
}
|
||||
}
|
||||
|
||||
inputs = {
|
||||
tf_state_postgres_conn_str = local.tf_state_postgres_conn_str
|
||||
}
|
||||
Reference in New Issue
Block a user