GitHub Actions
Summary: let a workflow read one environment, with one repository secret.
On your computer, with the GitHub CLI gh logged in:
secrets-chad machine create deploy -e shop/prod --github # this repository
secrets-chad machine create deploy -e shop/prod --github=org/repo --github-env production
It checks that gh can store secrets there, asks, waits for your approval in the browser, and gives the credential to
gh secret set SECRETS_DEVICE on stdin. The credential is in no file, argument or output. It prints the workflow lines:
steps:
- uses: audiochad/secrets@v0.1.0-alpha.2
- run: secrets-chad -e shop/prod run -- ./deploy.sh
env:
SECRETS_DEVICE: ${{ secrets.SECRETS_DEVICE }}
- The Action installs
secrets-chadfrom the releases ofaudiochad/secrets. Itsversioninput picks another release. - Set
SECRETS_DEVICEfor the steps that need it only. - End access with
secrets-chad -e shop/prod machine revoke deploy; the next job fails.