Skip to content

feat: add OpenTofu to github workflow (#36) #97

feat: add OpenTofu to github workflow (#36)

feat: add OpenTofu to github workflow (#36) #97

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
terraform:
uses: saidsef/saidsef/.github/workflows/tf-validate.yaml@main
with:
start-version: '0' # minimum version (format: 1.0.x)
end-version: '10' # maximum version (format: 1.10.x)
opentofu:
uses: saidsef/saidsef/.github/workflows/tf-validate.yaml@main
with:
start-version: '5' # minimum version (format: 1.5.x)
end-version: '8' # maximum version (format: 1.8.x)
tfsec:
uses: saidsef/saidsef/.github/workflows/tf-security.yaml@main
needs: [terraform, opentofu]
attest:
uses: saidsef/saidsef/.github/workflows/tf-attest.yaml@main
needs: [tfsec]
caller-identity-check:
if: contains(github.event_name, 'pull_request')
name: Return the IAM user
needs: [terraform, opentofu, tfsec]
permissions:
contents: read
id-token: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- id: 'auth'
name: 'Authenticate to GCP'
uses: google-github-actions/auth@v2
with:
workload_identity_provider: "${{ secrets.GOOGLE_PROVIDER }}"
service_account: "${{ secrets.GOOGLE_SERVICE_ACCOUNT }}"
- id: 'setup'
name: 'Setup Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
with:
version: '>= 471.0.0'
- id: 'gcloud'
name: 'gcloud CLI'
run: |-
gcloud info
auto-approve:
uses: saidsef/saidsef/.github/workflows/auto-approve.yaml@main
needs: [terraform, opentofu, tfsec, caller-identity-check]