Skip to content

Commit

Permalink
fix: correctly identify workflow_call
Browse files Browse the repository at this point in the history
  • Loading branch information
simonknittel committed May 8, 2024
1 parent 807ce11 commit 9e0355a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
uses: ./.github/workflows/terraform-plan.yml
with:
environment: ${{ inputs.environment }}
workflow_call: true
secrets: inherit

apply:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ on:
default: "test"
type: string

# `github.event_name` is `workflow_dispatch` even for `workflow_call`.
# https://github.com/actions/runner/discussions/1884
workflow_call:
required: false
type: boolean

jobs:
build_email_function:
uses: ./.github/workflows/build-email-function.yml
Expand Down Expand Up @@ -137,7 +143,7 @@ jobs:

- name: Store artifact
uses: actions/upload-artifact@v4.3.3
if: github.event_name == 'workflow_call'
if: inputs.workflow_call
with:
name: tfplan
path: terraform/tfplan
Expand Down

0 comments on commit 9e0355a

Please sign in to comment.