newrelic / deployment-marker-action

Github Action for recording a Deployment Marker in New Relic
https://github.com/marketplace/actions/new-relic-application-deployment-marker
Apache License 2.0
58 stars 23 forks source link

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

Open TWiStErRob opened 2 months ago

TWiStErRob commented 2 months ago

This line

https://github.com/newrelic/deployment-marker-action/blob/60142df2a3f5c23d3294486f474299b8f490cd90/action.yaml#L44-L46

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

https://github.com/newrelic/deployment-marker-action/blob/60142df2a3f5c23d3294486f474299b8f490cd90/entrypoint.sh#L23

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

https://github.com/newrelic/deployment-marker-action/blob/60142df2a3f5c23d3294486f474299b8f490cd90/README.md#L129-L131

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 commented 3 weeks ago

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