prb-contracts icon indicating copy to clipboard operation
prb-contracts copied to clipboard

Make CI pass on PRs

Open PaulRBerg opened this issue 5 years ago • 1 comments

@Ro5s's triggered a GitHub workflow, which was expected. Unfortunately it failed:

Capture d’écran 2020-11-10 à 18 24 55

And the reason is that the "MNEMONIC" stored in this GitHub repo's secrets looks to be not available in the environment spun up by GitHub in CI/CD.

TODO: either hardcode the mnemonic or find a way to pick it up from the repo's secrets.

PaulRBerg avatar Nov 10 '20 16:11 PaulRBerg

After a quick investigation now, I am starting to think that this could be a bug on GitHub's end. This is the message that I just sent them:

Hi, in my [paulrberg/contracts](https://github.com/paulrberg/contracts) repository, I have multiple GitHub secrets set up:

![paulrberg-contracts-secrets.png](https://github.zendesk.com/attachments/token/yvyJ1ieaizkopBlPeq1o4g1l4/?name=paulrberg-contracts-secrets.png)

I have a GitHub workflow that runs some continuous integration checks on my code:

https://github.com/paulrberg/contracts/blob/main/.github/workflows/integration.yaml

This workflows needs access to the GitHub secrets in order to do its job successfully. Now, the workflow works just fine when I push new commits to the `main` branch - the problem is with workflows triggered by PRs coming from repositories forked by external contributors. For instance, take this PR:

https://github.com/paulrberg/contracts/pull/24

And the workflow triggered by it:

https://github.com/paulrberg/contracts/runs/5469321270?check_suite_focus=true

If you look at the logs, you will see that the workflow failed with this error:

> Error: Please set MNEMONIC as an env variable

But that should NOT be the case. The GitHub secret `MNEMONIC` is there. GitHub should be able to pick it up and provide it to the GitHub Actions run. But it doesn't.

So, can you look into this for me? It seems like a cache bug on your end.

Thanks,
Paul

PaulRBerg avatar Mar 08 '22 18:03 PaulRBerg