Skip to content

Merge pull request #162 from sigstore/dependabot/terraform/iac/all-46… #250

Merge pull request #162 from sigstore/dependabot/terraform/iac/all-46…

Merge pull request #162 from sigstore/dependabot/terraform/iac/all-46… #250

Workflow file for this run

# Copyright 2024 The Sigstore Authors
# SPDX-License-Identifier: Apache-2.0
name: terraform-lint-validate
on:
push:
branches:
- main
pull_request:
permissions: {}
jobs:
lint-and-validate:
name: terraform-lint-validate
runs-on: ubuntu-latest
permissions:
contents: read
if: github.repository == 'sigstore/sigstore-devops-tools'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: '1.9'
- run: terraform fmt -check
- run: cp $GITHUB_WORKSPACE/.github/testdata/backend_override.tf $GITHUB_WORKSPACE/iac
- working-directory: ./iac
run: |
terraform init
terraform validate