Created
January 9, 2023 04:32
-
-
Save wenqiglantz/77f9f25d11ec2a31ad3231239572487b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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