GitHub Actions
How it works
The workflow installs the Ennote CLI, which reads its token and target from environment variables (ENNOTE_TOKEN, ENNOTE_ORGANIZATION_ID, ENNOTE_WORKSPACE_ID). ennote secret get <secret> -- <command> then runs your command with each key of the secret as an environment variable. Nothing is written to disk, and ennote auth login is not needed.
1. Create a token
Create a Personal Access Token with an expiration, and copy it.
2. Store it in GitHub
In your repository, open Settings → Secrets and variables → Actions → New repository secret, name it ENNOTE_TOKEN and paste the token.
3. Add the workflow
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
env:
ENNOTE_TOKEN: ${{ secrets.ENNOTE_TOKEN }}
ENNOTE_ORGANIZATION_ID: org_123
ENNOTE_WORKSPACE_ID: wrk_prod
ENNOTE_DO_NOT_TRACK: 1
steps:
- uses: actions/checkout@v4
- name: Install the Ennote CLI
run: curl -sSfL https://get.ennote.io/get-cli.sh | sh
- name: Run database migrations
run: ennote secret get db-credentials -- npm run migrate
- name: Deploy
run: ennote secret get aws -- ./deploy.sh
Replace org_123, wrk_prod, db-credentials and aws with your organization ID, workspace ID and secret names. ENNOTE_DO_NOT_TRACK=1 turns off the CLI's telemetry and update checks (config).
Read a single value
To pass one value to a tool that takes it as an argument, read a single key:
ennote secret get "database:password"
Prefer process injection where you can: a value printed to stdout can end up in logs. See ennote secret get for query formats (name@version:key).
FAQ
Do I need ennote auth login in CI?
No. When ENNOTE_TOKEN is set, the CLI uses it instead of the interactive login (ennote auth).
Where does the install script put the CLI?
In /usr/local/bin, which is on the PATH of GitHub-hosted runners. Packages and binaries are also on the releases page.
How do I rotate the token?
Create a new token, update the ENNOTE_TOKEN repository secret, then revoke the old token in Ennote (Personal Access Tokens).
Need Help?
If you encounter any issues or have questions, don't hesitate to contact support. Our team is here to assist you with any challenges you might face.
ennote version
ennote version prints the installed Ennote CLI version and checks whether a newer release is available. ennote --version and ennote -v do the same.
GitLab CI/CD
Use Ennote secrets in GitLab CI/CD: store an Ennote token as a masked CI/CD variable, install the Ennote CLI in the job, and inject secrets into scripts with ennote secret get.