Skip to content

Commit d35dd9e

Browse files
Fix [Ignore label] test: add EventPath input to action.yml to pass fake event into inner composite step
1 parent 5460f12 commit d35dd9e

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/Action-Test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,6 @@ jobs:
344344
uses: ./
345345
env:
346346
GH_TOKEN: ${{ github.token }}
347-
GITHUB_EVENT_PATH: ${{ runner.temp }}/fake-event.json
348347
with:
349348
Settings: |
350349
{
@@ -360,6 +359,7 @@ jobs:
360359
}
361360
}
362361
}
362+
EventPath: ${{ runner.temp }}/fake-event.json
363363

364364
- name: Verify - Ignore label
365365
shell: pwsh

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ inputs:
3131
description: Allow prerelease versions of the GitHub module if available.
3232
required: false
3333
default: 'false'
34+
EventPath:
35+
description: Path to the GitHub event JSON file. Defaults to the standard GitHub event path. Override for testing.
36+
required: false
37+
default: ''
3438

3539
outputs:
3640
Version:
@@ -68,5 +72,6 @@ runs:
6872
PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_Settings: ${{ inputs.Settings }}
6973
PSMODULE_RESOLVE_PSMODULEVERSION_INPUT_Name: ${{ inputs.Name }}
7074
PSMODULE_ACTION_PATH: ${{ github.action_path }}
75+
GITHUB_EVENT_PATH: ${{ inputs.EventPath || github.event_path }}
7176
run: |
7277
& "$env:PSMODULE_ACTION_PATH/scripts/main.ps1"

0 commit comments

Comments
 (0)