-
Hi, loving GitHub Actions! Quick question: a step in my workflow job has a PowerShell statement that reads a long value from the deployment payload, and concatenates it to make a variable value. In the logs, the
I can’t put it in an environment variable because the value is too long. Is there any way to mask a statement or payload property in PowerShell code? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
I tried using the Stop and start log commands in our PowerShell inline-code as below:
But it still shows that statement with If there any way to hide/mask it in the logs? |
Beta Was this translation helpful? Give feedback.
-
This is crucial for us, in terms of data security, to consider Actions for production CI/CD. Please advise @ethomson @chrispat @mscoutermarsh |
Beta Was this translation helpful? Give feedback.
-
If the value is too long for an environment variable we are not going to be able to mask it. My suggestion would be to read the value from the payload file on disk rather than using the context in this case. You can find the path to the payload file in the GITHUB_EVENT_PATH environment variable https://help.github.com/en/articles/virtual-environments-for-github-actions#default-environment-variables. |
Beta Was this translation helpful? Give feedback.
-
Thank you! (Btw, variable name is GITHUB_EVENT_PATH) |
Beta Was this translation helpful? Give feedback.
If the value is too long for an environment variable we are not going to be able to mask it. My suggestion would be to read the value from the payload file on disk rather than using the context in this case. You can find the path to the payload file in the GITHUB_EVENT_PATH environment variable https://help.github.com/en/articles/virtual-environments-for-github-actions#default-environment-variables.