Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please set the action output as declared in the action.yaml #61

Open
TWiStErRob opened this issue Apr 11, 2024 · 2 comments
Open

Please set the action output as declared in the action.yaml #61

TWiStErRob opened this issue Apr 11, 2024 · 2 comments
Labels
breaking-change Breaking Change enhancement New feature or request refactor Code refactoring / cleanup

Comments

@TWiStErRob
Copy link
Contributor

TWiStErRob commented Apr 11, 2024

This line

outputs:
deploymentId:
description: 'The id of the deployment'

promises a GitHub Action output (which is the standard way of moving information out of an action), and expected to be steps.my-step-id.outputs.deploymentId, but this line

echo "deploymentId=$deploymentId" >> $GITHUB_ENV

sets an env var. The README.md shows the env var usage:

# When chaining steps together, the deployment id is placeed into the github environment
- name: View output
run: echo "${{ env.deploymentId }}"

but it's not a GHA native/idiomatic way of passing outputs.

Please update the action so that it does not pollute the global env namespace with an un-prefixed env var.

-echo "deploymentId=$deploymentId" >> $GITHUB_ENV
+echo "deploymentId=$deploymentId" >> "${GITHUB_OUTPUT}"
@sanderblue
Copy link
Contributor

Agreed, this should be updated. Thanks for reaching out 🙂

@sanderblue sanderblue added breaking-change Breaking Change refactor Code refactoring / cleanup enhancement New feature or request labels Jun 14, 2024
@TWiStErRob
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Breaking Change enhancement New feature or request refactor Code refactoring / cleanup
Projects
None yet
Development

No branches or pull requests

2 participants