remove global env variables and replaces them by step-based env variables - #180
Conversation
…bles if needed. Following changes have been done do several workflows: ## NODE_AUTH_TOKEN The secrets.NODE_AUTH_TOKEN was removed from global "env" and added to "Setup up node"-step as local "env"-variable ## GITHUB_USER_SSH_KEY Removed from global "env" and 1. moved to actions/checkout@v4 "with.ssh-key" directly. 2. moved as local "env" variables to "Set up SSH"-step. ## GITHUB_USER_SSH_PUBLIC_KEY The public SSH Key was removed from global "env" and injected into "Delete signing key files"- and "Set up signin commits"-steps as local "env" variable. # GITHUB_USER_EMAIL and GITHUB_USER_NAME Remove both secrets from global "env" and moved them into "Set up Git"-step as local "env" variables.
|
We might want to discuss if this is correct: - name: Set up Git
env:
GITHUB_USER_EMAIL: ${{ secrets.GITHUB_USER_EMAIL }}
GITHUB_USER_NAME: ${{ secrets.GITHUB_USER_NAME }}
if: ${{ env.GITHUB_USER_EMAIL != '' && env.GITHUB_USER_NAME != '' }}
run: |
git config --global user.email "${{ env.GITHUB_USER_EMAIL }}"
git config --global user.name "${{ env.GITHUB_USER_NAME }}"both, the As alternative we could use something like: - name: Set up Git
run: |
${{ secrets.GITHUB_USER_EMAIL != '' }} && git config --global user.email "${{ secrets.GITHUB_USER_EMAIL }}"
${{ secrets.GITHUB_USER_NAME != '' }} && git config --global user.name "${{ secrets.GITHUB_USER_NAME }}"and/or we could also print a message (or document down), that if you decide to "Set up Git" you need both in order to function. |
tyrann0us
left a comment
There was a problem hiding this comment.
Thank you for working on this. I left a couple of comments.
Is there any use case where we just want to have 1 set or are both always required to ensure that it works?
I would keep this as-is.
Co-authored-by: Philipp Bammes <8144115+tyrann0us@users.noreply.github.com> Signed-off-by: Christian Leucht <family.leucht@gmail.com>
…feature/remove-global-env
…ONS out of global env variables.
tyrann0us
left a comment
There was a problem hiding this comment.
Thank you for incorporating the changes. I left a question and a request; this should be good to go once these are resolved. 😉
|
I only have a minor comment: please update the PR description to include the |
done 😬 and also added |
tyrann0us
left a comment
There was a problem hiding this comment.
I'm still unsure how many times we have to declare the local COMPOSER_AUTH variable, but this doesn't prevent me from approving. Thank you for working on this! 💪🏽 LGTM.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Following changes have been done do several workflows:
NODE_AUTH_TOKENThe
secrets.NODE_AUTH_TOKENwas removed from global "env" and added to "Setup up node"-step as local "env"-variableGITHUB_USER_SSH_KEYRemoved from global "env" and
actions/checkout@v4andwith.ssh-keydirectly.GITHUB_USER_SSH_PUBLIC_KEYThe public SSH Key was removed from global "env" and injected into "Delete signing key files"- and "Set up signin commits"-steps as local "env" variable.
GITHUB_USER_EMAILandGITHUB_USER_NAMERemove both secrets from global "env" and moved them into "Set up Git"-step as local "env" variables.
NODE_OPTIONSare moved out of the global "env" into the specific step where it is needed.
COMPOSER_AUTHare moved out of the global "env" into the specific step where it is needed for installing composer dependencies.