Skip to content

Instantly share code, notes, and snippets.

@wenqiglantz
Created January 9, 2023 04:32
Show Gist options
  • Save wenqiglantz/77f9f25d11ec2a31ad3231239572487b to your computer and use it in GitHub Desktop.
Save wenqiglantz/77f9f25d11ec2a31ad3231239572487b to your computer and use it in GitHub Desktop.
name: "Terraform Deployment"
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to run the workflow against'
type: environment
required: true
push:
branches: [ main ]
paths: 'terraform/**' # need to specify paths here as that's the terraform directory
pull_request:
branches: [ main ]
paths: 'terraform/**' # need to specify paths here as that's the terraform directory
jobs:
terraform:
permissions:
id-token: write # need this for OIDC
contents: read # This is required for actions/checkout@v2
uses: wenqiglantz/reusable-workflows-modules/.github/workflows/terraform.yml@main
with:
# need to specify working-directory as that's where the terraform files live in the source code
working-directory: ./terraform
secrets: inherit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment