From 66e5bffa3fdcbee97aa23e657062a094ee4eff67 Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Mon, 13 Oct 2025 17:46:09 +0200 Subject: [PATCH] chore: use mise instead of terragrunt-action --- .github/workflows/docs-deploy.yml | 27 +++++++++------------------ .github/workflows/docs-destroy.yml | 11 +++++------ mise.toml | 20 ++++++++++++++++++++ 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 6643c5abfd..5344af0ea6 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -112,6 +112,9 @@ jobs: with: persist-credentials: false + - name: Setup Mise + uses: immich-app/devtools/actions/use-mise@697a75e2c3186d3c037c2c159855cf2d566542ba # use-mise-action-0.0.1 + - name: Load parameters id: parameters uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 @@ -150,12 +153,8 @@ jobs: 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 }} - uses: gruntwork-io/terragrunt-action@aee21a7df999be8b471c2a8564c6cd853cb674e1 # v2.1.8 - with: - tg_version: '0.58.12' - tofu_version: '1.7.1' - tg_dir: 'deployment/modules/cloudflare/docs' - tg_command: 'apply' + working-directory: 'deployment/modules/cloudflare/docs' + run: 'mise run tf apply' - name: Deploy Docs Subdomain Output id: docs-output @@ -165,12 +164,8 @@ jobs: 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 }} - uses: gruntwork-io/terragrunt-action@aee21a7df999be8b471c2a8564c6cd853cb674e1 # v2.1.8 - with: - tg_version: '0.58.12' - tofu_version: '1.7.1' - tg_dir: 'deployment/modules/cloudflare/docs' - tg_command: 'output -json' + working-directory: 'deployment/modules/cloudflare/docs' + run: 'mise run tf output -json' - name: Output Cleaning id: clean @@ -199,12 +194,8 @@ jobs: 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 }} - uses: gruntwork-io/terragrunt-action@aee21a7df999be8b471c2a8564c6cd853cb674e1 # v2.1.8 - with: - tg_version: '0.58.12' - tofu_version: '1.7.1' - tg_dir: 'deployment/modules/cloudflare/docs-release' - tg_command: 'apply' + working-directory: 'deployment/modules/cloudflare/docs-release' + run: 'mise run tf apply' - name: Comment uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3.2.0 diff --git a/.github/workflows/docs-destroy.yml b/.github/workflows/docs-destroy.yml index c4b9a9fff3..1b29fdd726 100644 --- a/.github/workflows/docs-destroy.yml +++ b/.github/workflows/docs-destroy.yml @@ -18,6 +18,9 @@ jobs: with: persist-credentials: false + - name: Setup Mise + uses: immich-app/devtools/actions/use-mise@697a75e2c3186d3c037c2c159855cf2d566542ba # use-mise-action-0.0.1 + - name: Destroy Docs Subdomain env: TF_VAR_prefix_name: 'pr-${{ github.event.number }}' @@ -25,12 +28,8 @@ jobs: 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 }} - uses: gruntwork-io/terragrunt-action@aee21a7df999be8b471c2a8564c6cd853cb674e1 # v2.1.8 - with: - tg_version: '0.58.12' - tofu_version: '1.7.1' - tg_dir: 'deployment/modules/cloudflare/docs' - tg_command: 'destroy -refresh=false' + working-directory: 'deployment/modules/cloudflare/docs' + run: 'mise run tf destroy -refresh=false' - name: Comment uses: actions-cool/maintain-one-comment@4b2dbf086015f892dcb5e8c1106f5fccd6c1476b # v3.2.0 diff --git a/mise.toml b/mise.toml index ac6bcdb816..4ed4460c48 100644 --- a/mise.toml +++ b/mise.toml @@ -2,6 +2,8 @@ node = "22.20.0" flutter = "3.35.5" pnpm = "10.18.0" +terragrunt = "0.58.12" +opentofu = "1.7.1" [tools."github:CQLabs/homebrew-dcm"] version = "1.30.0" @@ -505,3 +507,21 @@ description = "Auto-fix Dart Code Metrics" dir = "mobile" hide = true run = "dcm fix lib" + +# docs deployment +[tasks."tg:fmt"] +run = "terragrunt hclfmt" +description = "Format terragrunt files" + +[tasks.tf] +run = "terragrunt run --all" +description = "Wrapper for terragrunt run-all" +dir = "{{cwd}}" + +[tasks."tf:fmt"] +run = "tofu fmt -recursive tf/" +description = "Format terraform files" + +[tasks."tf:init"] +run = "mise run tf init -- -reconfigure" +dir = "{{cwd}}"