-
Recently (today) it looks like Github Secrets aren’t being passed in properly: Good run: https://github.com/dchbx/enroll-ui/runs/545511347?check_suite_focus=true env: STATUS: passing SHA: 708bdd78670da9d35e260524a1c576f4fccc0596 BRANCH: refs/heads/master YELLR_KEY: *** YELLR_URL: *** NX_CLOUD_AUTH_TOKEN: *** Bad run: https://github.com/dchbx/enroll-ui/runs/549703106?check_suite_focus=true env: STATUS: passing SHA: 55f69459498064d0af45b48b79def6f28863a75c BRANCH: refs/heads/master YELLR_KEY: YELLR_URL: NX_CLOUD_AUTH_TOKEN: |
Beta Was this translation helpful? Give feedback.
Replies: 19 comments 8 replies
-
I am having the same issue, unfortunately. Some secret values are now blank as of today… |
Beta Was this translation helpful? Give feedback.
-
I’m also having this issue. I notice that in your workflow yml file, like in mine, the missing secret is defined in the env section. I have other secrets referenced outside of env (in the jobs section), and those are passed in properly. Weirdly, when I change one of the references to the env variable to directly reference the problematic secret (but keep the other ones still referencing the env variable), everything works. So it seems like Github Actions is looking at the jobs section, checking which secrets are being used, and only passing those in, forgetting to check if they are being used by the env section. |
Beta Was this translation helpful? Give feedback.
-
I also tested using secrets in my workflows, I tried setting secrets as env , and also tried directly using secrets in with section of an action, however everything works fine on my side. I did not reproduce the problem. I have helped you report this ticket to the appropriate engineering team for further investigation and evaluation. If they have any progress, I will notify you in time, and sometimes the appropriate engineers may directly reply you here. In addition, please make sure that the secrets you want to use are still exising in the Secrets list on the Settings tab of your repositories. Make sure nobody have removed or changed them. If the problem still exists, you can try to remove the secrets then re-add them to the list to see if the problem can be solved. |
Beta Was this translation helpful? Give feedback.
-
I removed the secrets and re-added them with no success. There’s been no change to our repo, secrets, workflow file, or anything else. It just stopped working between Monday and Tuesday. |
Beta Was this translation helpful? Give feedback.
-
BINGO! I moved the secrets references into the job and they were pulled in perfectly. So, Github Actions has a regression bug. @brightran can you flag this please? |
Beta Was this translation helpful? Give feedback.
-
Sorry for the disruption. The behavior will be reverted shortly. The scenario is the root env in the yaml file references a secret. Anywhere else in the yaml file that references a secret should work. For example, step-level env. Otherwise let me know if you have another scenario where it was broken. |
Beta Was this translation helpful? Give feedback.
-
Should be reverted now. Can you trigger another run and confirm? |
Beta Was this translation helpful? Give feedback.
-
It works for me now. Thanks for the fix! |
Beta Was this translation helpful? Give feedback.
-
@kaikue glad that the problem has gone on your side. @markgoho @sagv could you please check if it also back to work on your side? Apologies for the inconvenience caused to you. |
Beta Was this translation helpful? Give feedback.
-
Yes, working now. Thanks for investigating and helping to fix this regression. |
Beta Was this translation helpful? Give feedback.
-
Secrets don’t appear to work within the windows-latest or windows-2019 I have two workflows on the same repository. One uses ubuntu-latest and the other windows-latest. They should have the same visibility. When I replace the username and password with literal text it works. Secrets are not functional within the windows environment. Please can you help?
echo “$DockerPassword” | docker login -u “$DockerUserName” --password-stdin index.docker.io |
Beta Was this translation helpful? Give feedback.
-
@naj8ryon Windows the “run” step uses powershell by default. Try “$env:DockerPassword” or you can change the shell |
Beta Was this translation helpful? Give feedback.
-
Brilliant. The"$env:DockerPassword" approach for getting the variables has worked. Thank you @ericsciple . I really appreciate your help. |
Beta Was this translation helpful? Give feedback.
-
@ericsciple I’ve just run into this issue. When I had the secret defined at the organisation level it wasn’t being picked up by the action (it was initially set to private repo, then I tested by allowing only the specific repo). When I move the secrets to the repo itself the workflow worked correctly. |
Beta Was this translation helpful? Give feedback.
-
I don’t know what’s happening either, I tried defining I’ve noted that these are only available on paid accounts for private repo using organization secrets, but I just simply use a private github repo under my own name, with secrets on the repo itself. Anybody can give me a hint ? |
Beta Was this translation helpful? Give feedback.
-
Ok my apologies here, mistake was mine. I forgot to pipe my env vars to Docker ^^’ |
Beta Was this translation helpful? Give feedback.
-
This is happening again, today! |
Beta Was this translation helpful? Give feedback.
-
I’m experiencing some flaky jobs due to this too. The same job has been intermittently failing for a couple months (with no changes to the workflow), each time due to the secrets not being available for some unknown reason. I hadn’t noticed because the All the successful workflow runs All the intermittently failing workflow runs IDK if this is useful debugging information, but it seems like a failed job will consistently fail again, even if retried. The job runs on |
Beta Was this translation helpful? Give feedback.
-
I’ve also noticed that secrets are missing randomly on certain test runs: When it’s working, I see:
When it randomly fails, I see:
Note the missing secrets indicated by no @brightran Can you escalate this to the appropriate engineering team? |
Beta Was this translation helpful? Give feedback.
BINGO!
I moved the secrets references into the job and they were pulled in perfectly. So, Github Actions has a regression bug. @brightran can you flag this please?