Skip to content

feat: add OpenTofu test to CI workflows #125

feat: add OpenTofu test to CI workflows

feat: add OpenTofu test to CI workflows #125

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 TF version (format 1.0.x)
end-version: '10' # maximum TF version (format 1.10.x)
opentofu:
uses: saidsef/saidsef/.github/workflows/tofu-validate.yaml@main
with:
start-version: '6' # minimum TOFU version (format 1.6.x)
end-version: '8' # maximum TOFU 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
runs-on: ubuntu-latest
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions
role-session-name: ${{ github.event.repository.name }}-${{ github.ref_type }}
- run: |
aws sts get-caller-identity
auto-approve:
uses: saidsef/saidsef/.github/workflows/auto-approve.yaml@main
needs: [terraform, opentofu, tfsec, caller-identity-check]