deployment-marker-action icon indicating copy to clipboard operation
deployment-marker-action copied to clipboard

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

Open TWiStErRob opened this issue 10 months ago • 2 comments

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}"

TWiStErRob avatar Apr 11 '24 10:04 TWiStErRob

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

sanderblue avatar Jun 14 '24 16:06 sanderblue

  • Fixed in https://github.com/newrelic/deployment-marker-action/pull/70
  • Released in https://github.com/newrelic/deployment-marker-action/releases/tag/v2.5.1

TWiStErRob avatar Sep 05 '24 12:09 TWiStErRob