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
No way to set the ACTIONS_ALLOW_UNSECURE_COMMANDS variable. #641
Comments
OK, stupid error. |
Likely highly off-topic, but what's an LTA error? |
Less than awesome error. Something that does not point to the precise problem or where the misunderstanding has occurred, and leaves you wondering why something is wrong. This is still a LTA error, BTW. Instead of saying "whatever you put in the |
It worked for me this way.
|
I'll update the toolkit docs, but if you are trying to opt into the old commands, here's how you can do that: If you are using these old commands, the steps that use them in your workflow will fail. You will want to move towards using Environment Files. You may also opt into unsecure command execution as well, at a job level or for all jobs on your self hosted runner. We recommend you do not choose to do this, and instead update to the new Environment Files.
|
@thboop the main problem is that downstream actions such as github-script were, until 3 hours ago, not updated. Thanks a lot anyway. |
After re-reading a few times I see the right way to do this going forward. Setting an environment variable
But the dev experience for this deprecation is a bit rough. It was only through this issue that I found the answer. The path from "this is no longer correct" to "what is the right way to do it" is a little hazy at first. I didn't realize deprecating And googling In hindsight, I see the deprecation error is my first google result, but I was looking for the official docs at that point, not the deprecation notice. |
So if you want to quickly fix this.. I've set the first 'step' on all workflows to the following:
|
don't understand why we need echo "::set-env name=PR_AUTHOR::${{ github.event.pull_request.user.login }}"
echo "::set-env name=PR_AUTHOR::${{ github.event.issue.user.login }}" with echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
echo "PR_AUTHOR=${{ github.event.issue.user.login }}" >> $GITHUB_ENV |
That is correct. You will want to move towards using Environment Files, which is what you are doing. We don't recommend you set |
This definitely worked. |
I am attempting to quickly fix a repo that is no longer deploying to Azure Functions upon push:
When I attempt to kickoff this action, I get this error as a result:
I am not sure of what I am doing wrong, does anyone know? |
I would say it's in this line:
and this line
I would say that should be ${{ PYTHON_VERSION }} In any case, if you're setting that deterministically maybe you should simply set the version there. Again, I would say this is the case of a LTA error. Simply putting |
Do those who are thumbing down care to explain why? This indeed worked like a charm. |
Refs: - actions/toolkit#641 modified: .github/workflows/notebooks.yml
It worked for me. Thank you! |
Refs: - actions/toolkit#641 modified: .github/workflows/notebooks.yml
There was a change in the GHA to enable tighter security. For now we work around that using this approach: actions/toolkit#641 (comment)
The add-path command in Github Actions has been deprecated: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/ This commit enables it use for a little longer, following the example from: actions/toolkit#641
Use ACTIONS_ALLOW_UNSECURE_COMMANDS: true as ENV actions/toolkit#641
I tried to run like below and I still get The
This is the command where I get the error.. |
added env variable as per actions/toolkit#641 (comment)
applied changes based on the following comments actions/toolkit#641
This is probably a LTA error issue, more than other kind of problem. When set-env is used, this is the recommendation issued:
All's good and well. Let's then set in an action such as this one that variable to the very value indicated in the error:
But then, this is the error obtained:
While we could follow one of these recommendations, I can't find what they mean and what's the reasonable value for them. It looks like errors like these are happening all over the place since set-env was deprecated today.
The text was updated successfully, but these errors were encountered: