Skip to content
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

[Feature/Docs] How to pass GitHub actions environment variables to the running container? #200

Open
2 tasks done
barbeque opened this issue Nov 27, 2023 · 0 comments
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@barbeque
Copy link

barbeque commented Nov 27, 2023

Is this feature missing in the latest version?

  • I'm using the latest release

Is your feature request related to a problem? Please describe.

I have been running tests against a webpage, and it works great, but now I would like to take advantage of the GitHub actions secrets for things like account passwords.

I can't figure out a way to pass environment variables to the Puppeteer runner. I've tried:

  • env statements in the job step itself (don't seem to show up in process.env)
  • Writing secrets to a text file (text files don't appear to get copied into the runner's home directory)

Describe the solution you'd like?

If possible, please update the test.yml example workflow to include a way to pass an environment variable from GitHub Actions into the script being run with Puppeteer inside the container.

Describe alternatives you've considered?

One idea I had was using the docker-run action to force a text file to appear in there, but it feels like this might make the actions file convoluted. At the moment, the environment variables are hardcoded into the JS file, which is not great for "secrets."

Anything else?

I am fairly new to GitHub Actions, so it's possible there's something in the documentation that I've missed. Thanks for your time!

Also the greetings job on this repo failed, it seems like it can't get ahold of the assert module.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@barbeque barbeque added the enhancement New feature or request label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant