GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing dotenvx.com — Encrypt a .env file for GitHub Actions GitHub ActionsEncrypt a .env file for GitHub Actions and inject its secrets into your workflow at runtime.
PrerequisitesStart with a GitHub repository and access to configure its Actions secrets. Open a terminal at the repository root to prepare the encrypted CI environment file. The workflow runs remotely in GitHub Actions using an Enclaved Key. The setup commands below use npm or pnpm. InstallIn your project, install Dotenvx as a development dependency.
Commit package.json and your package manager's lockfile so the workflow can install the same dependencies. EncryptCreate a .env.ci file for your workflow.
Log in to Dotenvx.
Encrypt it with an Enclaved Key ◊
When prompted, choose Enclaved, select GitHub Actions, and choose the connection and repository for your workflow. Use DOTENV_PRIVATE_KEY_CI as the private key name. Your .env.ci values are now encrypted. The Enclaved Key is configured for GitHub Actions so the remote runner can decrypt them. CommitCommit your encrypted .env.ci file with your code so GitHub Actions can load it. Keep .env.keys out of git. The -f flag adds the encrypted file even if your project ignores .env files.
RunCreate .github/workflows/ci.yml. This workflow checks out your encrypted .env.ci file, installs Dotenvx, and uses DOTENV_PRIVATE_KEY_CI from GitHub Actions secrets to decrypt it on the runner.
The pnpm example uses version 10; match it to the version used for your project's lockfile. Commit the workflow and push your changes:
Open your repository's Actions tab, select the CI run, and open Check CI secrets. A successful run prints:
The check confirms that the remote runner received the decrypted HELLO value. Replace the node -e check with your test or build command when you're ready to use your own CI secrets. ConclusionYou've encrypted your CI secrets, committed them with your code, and loaded them on a GitHub Actions runner with an Enclaved Key. Your encrypted .env.ci file travels with your repository, ready for your workflow's tests and builds. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |