Add save-state and set-output file commands#1178
Merged
Conversation
thboop
reviewed
Sep 13, 2022
thboop
reviewed
Sep 13, 2022
| } | ||
|
|
||
| export function prepareKeyValueMessage(key: string, value: any): string { | ||
| const delimiter = `ghadelimiter_${uuidv4()}` |
9579083 to
c08ee23
Compare
c08ee23 to
28f9431
Compare
a44786d to
28f9431
Compare
This was referenced Oct 6, 2022
redian
added a commit
to redian/tar-action
that referenced
this pull request
Jan 5, 2023
In version 1.10.0 of `@actions/core` they have fixed the warning we are getting for set-output in our github actions. As per per this PR actions/toolkit#1178 And as discussed here actions/toolkit#1218
This was referenced Mar 16, 2023
skeggse
reviewed
Apr 19, 2023
Comment on lines
+34
to
+38
| if (key.includes(delimiter)) { | ||
| throw new Error( | ||
| `Unexpected input: name should not contain the delimiter "${delimiter}"` | ||
| ) | ||
| } |
There was a problem hiding this comment.
The check for the delimiter in the key feels a little misleading to me - if the key is user-controlled, it can still be used to add additional outputs if that's the risk being mitigated here; the delimiter doesn't capture the key, it just captures the value.
Suggested change
| if (key.includes(delimiter)) { | |
| throw new Error( | |
| `Unexpected input: name should not contain the delimiter "${delimiter}"` | |
| ) | |
| } |
elliottkember
added a commit
to elliottkember/github-actions-query-branch-name
that referenced
this pull request
Jul 20, 2023
The `@actions/core` package has been updated to squash this warning: > The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ Notes: > Action authors who are using the toolkit should update the @actions/core package to v1.10.0 or greater to get the updated saveState and setOutput functions. https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md > ### 1.10.0 > - `saveState` and `setOutput` now use environment files if available [#1178](actions/toolkit#1178)
levibostian
added a commit
to levibostian/decaf
that referenced
this pull request
Nov 26, 2024
When running the tool, I get warning: Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ But I'm using the latest 1.11.0 version of actions/core npm module so this shouldn't happen? I found the PR that implemented a fix for the deprecation, actions/toolkit#1178, and in it, I see that it checks if it has access to the GITHUB_OUTPUT environment variable. If it doesn't, it will fallback to previous behavior. commit-id:c8c672a4
levibostian
added a commit
to levibostian/decaf
that referenced
this pull request
Nov 26, 2024
When running the tool, I get warning: Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ But I'm using the latest 1.11.0 version of actions/core npm module so this shouldn't happen? I found the PR that implemented a fix for the deprecation, actions/toolkit#1178, and in it, I see that it checks if it has access to the GITHUB_OUTPUT environment variable. If it doesn't, it will fallback to previous behavior. commit-id:c8c672a4
levibostian
added a commit
to levibostian/decaf
that referenced
this pull request
Nov 26, 2024
When running the tool, I get warning: Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ But I'm using the latest 1.11.0 version of actions/core npm module so this shouldn't happen? I found the PR that implemented a fix for the deprecation, actions/toolkit#1178, and in it, I see that it checks if it has access to the GITHUB_OUTPUT environment variable. If it doesn't, it will fallback to previous behavior. commit-id:c8c672a4
levibostian
added a commit
to levibostian/decaf
that referenced
this pull request
Nov 28, 2024
When running the tool, I get warning: Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ But I'm using the latest 1.11.0 version of actions/core npm module so this shouldn't happen? I found the PR that implemented a fix for the deprecation, actions/toolkit#1178, and in it, I see that it checks if it has access to the GITHUB_OUTPUT environment variable. If it doesn't, it will fallback to previous behavior. commit-id:c8c672a4
levibostian
added a commit
to levibostian/decaf
that referenced
this pull request
Feb 17, 2025
When running the tool, I get warning: Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ But I'm using the latest 1.11.0 version of actions/core npm module so this shouldn't happen? I found the PR that implemented a fix for the deprecation, actions/toolkit#1178, and in it, I see that it checks if it has access to the GITHUB_OUTPUT environment variable. If it doesn't, it will fallback to previous behavior. commit-id:c8c672a4
2 tasks
2 tasks
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for the file command version of
save-stateandset-outputthat are being added to the runner in #2118.In the case that these commands are being used on a runner that doesn't support the file-command versions they will fallback to the pre-existing workflow commands.