Skip to content

testing using env in job block #5

testing using env in job block

testing using env in job block #5

Workflow file for this run

name: IaC Main
concurrency:
group: iac
cancel-in-progress: true
on:
push:
permissions:
id-token: write
contents: read
env:
TF_VERSION: '1.6.2'
TG_VERSION: '0.55.15'
AWS_REGION: us-east-1
jobs:
dummy:
runs-on: ubuntu/latest
steps:
- name: some crap
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{env.AWS_REGION }}
verify:
if: github.ref != 'refs/heads/main'
strategy:
matrix:
environment: [stage, production]
module: [terraform/tfbackend, network/vpc, services/backend-infra, data-store/cache, data-store/database, services/frontend]
uses: ./.github/workflows/iac_verify.yaml
with:
tf_version: ${{ env.TF_VERSION }}

Check failure on line 35 in .github/workflows/iac_main.yaml

View workflow run for this annotation

GitHub Actions / IaC Main

Invalid workflow file

The workflow is not valid. .github/workflows/iac_main.yaml (Line: 35, Col: 19): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TF_VERSION .github/workflows/iac_main.yaml (Line: 36, Col: 19): Unrecognized named-value: 'env'. Located at position 1 within expression: env.TG_VERSION
tg_version: ${{ env.TG_VERSION }}
aws_region: ${{ env.AWS_REGION }}
environment: ${{ matrix.environment }}
module: ${{ matrix.module }}
secrets: inherit
apply:
if: github.ref == 'refs/heads/main'
strategy:
matrix:
environment: [stage]
module: [terraform/tfbackend, network/vpc, services/backend-infra, data-store/cache, data-store/database, services/frontend]
uses: ./.github/workflows/iac_apply.yaml
with:
tf_version: ${{ env.TF_VERSION }}
tg_version: ${{ env.TG_VERSION }}
aws_region: ${{ env.AWS_REGION }}
environment: ${{ matrix.environment }}
module: ${{ matrix.module }}
secrets: inherit