Skip to content

Commit e769a94

Browse files
committed
ci: use mise to set up Terraform on CI
Part of #1748
1 parent 271da56 commit e769a94

File tree

3 files changed

+8
-24
lines changed

3 files changed

+8
-24
lines changed

.github/workflows/provision-by-terraform.yml

+8-22
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,14 @@ jobs:
4444
git fetch --depth=1 origin generated-terraform
4545
git worktree add terraform-data generated-terraform
4646
47-
# https://github.com/tfutils/tfenv#manual
48-
- name: Install tfenv
49-
uses: actions/[email protected]
47+
- name: Install mise to set up Terraform
48+
uses: jdx/[email protected] # https://github.com/jdx/mise-action
5049
with:
51-
# https://github.com/actions/checkout#checkout-multiple-repos-nested
52-
repository: tfutils/tfenv
53-
path: tfenv
54-
ref: v3.0.0
55-
# Whether to configure the token or SSH key with the local git config. Default: true
56-
persist-credentials: false
57-
58-
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
59-
- name: Add tfenv directory to PATH
60-
run: echo "$GITHUB_WORKSPACE/tfenv/bin" >> $GITHUB_PATH
61-
62-
# https://github.com/tfutils/tfenv#tfenv-install-version
63-
# https://github.com/tfutils/tfenv#tfenv-use-version
64-
- name: Install terraform
65-
working-directory: infra/terraform
66-
run: |
67-
tfenv install
68-
tfenv use
50+
version: 2025.3.2 # [default: latest] mise version to install
51+
install: true # [default: true] run `mise install`
52+
cache: true # [default: true] cache mise using GitHub's cache
53+
log_level: info # [default: info] log level
54+
working_directory: infra/terraform # [default: .] directory to run mise in
6955

7056
- name: Install ansible-vault
7157
# NOTE: during version bump don't forget to update in other places: deploy.yml and provisioning-by-ansible.yml
@@ -76,9 +62,9 @@ jobs:
7662
# https://developer.hashicorp.com/terraform/cli/commands#upgrade-and-security-bulletin-checks
7763
CHECKPOINT_DISABLE: true
7864
run: |
79-
tfenv --version
8065
terraform -version
8166
ansible-vault --version
67+
mise --version
8268
8369
- name: Decrypt terraform files
8470
working-directory: infra/terraform

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ infra/terraform/terraform.tfstate.backup
3434

3535
# created by .github/workflows/provision-by-terraform.yml
3636
infra/terraform/terraform-data/
37-
tfenv/
3837

3938
# used by infra/docker/prod.yml
4039
infra/docker/application-prod.properties

infra/terraform/.terraform-version

-1
This file was deleted.

0 commit comments

Comments
 (0)