mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(ci): Use tool versions action to parse terraform version (#4076)
Extracted from feedback on #4049
This commit is contained in:
10
.github/workflows/_deploy_production.yml
vendored
10
.github/workflows/_deploy_production.yml
vendored
@@ -76,13 +76,13 @@ jobs:
|
||||
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
|
||||
TF_WORKSPACE: "production"
|
||||
steps:
|
||||
- name: Get Terraform Version
|
||||
run: |
|
||||
TERRAFORM_VERSION=$(cat .tool-versions | grep terraform | awk '{ print $NF; }')
|
||||
echo "TERRAFORM_VERSION=${TERRAFORM_VERSION}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v4
|
||||
- name: Tool Versions
|
||||
id: versions
|
||||
uses: marocchino/tool-versions-action@v1.2.0
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: ${{ env.TERRAFORM_VERSION }}
|
||||
terraform_version: ${{ steps.versions.outputs.terraform }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
||||
10
.github/workflows/_terraform.yml
vendored
10
.github/workflows/_terraform.yml
vendored
@@ -17,13 +17,13 @@ jobs:
|
||||
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
|
||||
TF_WORKSPACE: "staging"
|
||||
steps:
|
||||
- name: Get Terraform Version
|
||||
run: |
|
||||
TERRAFORM_VERSION=$(cat .tool-versions | grep terraform | awk '{ print $NF; }')
|
||||
echo "TERRAFORM_VERSION=${TERRAFORM_VERSION}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v4
|
||||
- name: Tool Versions
|
||||
id: versions
|
||||
uses: marocchino/tool-versions-action@v1.2.0
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: ${{ env.TERRAFORM_VERSION }}
|
||||
terraform_version: ${{ steps.versions.outputs.terraform }}
|
||||
- uses: actions/checkout@v4
|
||||
- name: Validate cloud-init
|
||||
run: |
|
||||
|
||||
10
.github/workflows/cd.yml
vendored
10
.github/workflows/cd.yml
vendored
@@ -41,13 +41,13 @@ jobs:
|
||||
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
|
||||
TF_WORKSPACE: "staging"
|
||||
steps:
|
||||
- name: Get Terraform Version
|
||||
run: |
|
||||
TERRAFORM_VERSION=$(cat .tool-versions | grep terraform | awk '{ print $NF; }')
|
||||
echo "TERRAFORM_VERSION=${TERRAFORM_VERSION}" >> $GITHUB_ENV
|
||||
- uses: actions/checkout@v4
|
||||
- name: Tool Versions
|
||||
id: versions
|
||||
uses: marocchino/tool-versions-action@v1.2.0
|
||||
- uses: hashicorp/setup-terraform@v3
|
||||
with:
|
||||
terraform_version: ${{ env.TERRAFORM_VERSION }}
|
||||
terraform_version: ${{ steps.versions.outputs.terraform }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
||||
Reference in New Issue
Block a user