[GH-ISSUE #1647] $GITHUB_STEP_SUMMARY is undefined #818

Closed
opened 2026-03-01 21:46:38 +03:00 by kerem · 4 comments
Owner

Originally created by @joanrodriguez on GitHub (Feb 23, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1647

Bug report info

n/a

Command used with act

act

Describe issue

When running act, my workflows fail if they try to write to GITHUB_STEP_SUMMARY.

I found as a workaround that I can make my workflows work by providing a value through the --env flag:

I searched the code and the only mention of this ENV variable is this line:
github.com/nektos/act@932863bef5/.github/actions/run-tests/action.yml (L65-L68)

Since it's wrapped around an if statement, I'm assuming that it cannot fail.

Not familiar with the code and not a Go developer, but I'm assuming it should be defined there? github.com/nektos/act@21ea3d0d5f/pkg/runner/step.go (L108-L111)

Thanks

No response

Workflow content

const summaryFilePath = process.env['GITHUB_STEP_SUMMARY'];
await promises.appendFile(summaryFilePath, report, {encoding: 'utf8'});

Relevant log output

| TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
|     at open (node:internal/fs/promises:456:10)
|     at writeFile (node:internal/fs/promises:795:20)
|     at Object.appendFile (node:internal/fs/promises:808:10)
|     at file:///root/dev/realadvisor/[eval1]:36:18
|     at processTicksAndRejection


### Additional information

_No response_
Originally created by @joanrodriguez on GitHub (Feb 23, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1647 ### Bug report info ```plain text n/a ``` ### Command used with act ```sh act ``` ### Describe issue When running act, my workflows fail if they try to write to GITHUB_STEP_SUMMARY. I found as a workaround that I can make my workflows work by providing a value through the --env flag: I searched the code and the only mention of this ENV variable is this line: https://github.com/nektos/act/blob/932863bef508868168954ef69572750cf87f463f/.github/actions/run-tests/action.yml#L65-L68 Since it's wrapped around an if statement, I'm assuming that it cannot fail. Not familiar with the code and not a Go developer, but I'm assuming it should be defined there? https://github.com/nektos/act/blob/21ea3d0d5fc92cf9ae93c62c0af7ec3a5da36541/pkg/runner/step.go#L108-L111 Thanks ### Link to GitHub repository _No response_ ### Workflow content ```yml const summaryFilePath = process.env['GITHUB_STEP_SUMMARY']; await promises.appendFile(summaryFilePath, report, {encoding: 'utf8'}); ``` ### Relevant log output ```sh | TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined | at open (node:internal/fs/promises:456:10) | at writeFile (node:internal/fs/promises:795:20) | at Object.appendFile (node:internal/fs/promises:808:10) | at file:///root/dev/realadvisor/[eval1]:36:18 | at processTicksAndRejection ``` ``` ### Additional information _No response_
kerem 2026-03-01 21:46:38 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@joanrodriguez commented on GitHub (Feb 23, 2023):

Sorry, just found out about https://github.com/nektos/act/pull/1607 and https://github.com/nektos/act/issues/1533

<!-- gh-comment-id:1441510991 --> @joanrodriguez commented on GitHub (Feb 23, 2023): Sorry, just found out about https://github.com/nektos/act/pull/1607 and https://github.com/nektos/act/issues/1533
Author
Owner

@catthehacker commented on GitHub (Feb 23, 2023):

Fixed via #1607

<!-- gh-comment-id:1442113710 --> @catthehacker commented on GitHub (Feb 23, 2023): Fixed via #1607
Author
Owner

@joanrodriguez commented on GitHub (Feb 24, 2023):

Thanks!!

When's the next release?

<!-- gh-comment-id:1444467524 --> @joanrodriguez commented on GitHub (Feb 24, 2023): Thanks!! When's the next release?
Author
Owner

@jsoref commented on GitHub (Apr 4, 2024):

It was released in https://github.com/nektos/act/releases/tag/v0.2.43

<!-- gh-comment-id:2038172489 --> @jsoref commented on GitHub (Apr 4, 2024): It was released in https://github.com/nektos/act/releases/tag/v0.2.43
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#818
No description provided.