CI/CD pipelines have made shipping code faster, but they’ve also multiplied the number of places secrets live and move. In GitHub Actions alone, secrets are passed through workflows, injected into environments, and reused across deployments. While GitHub offers basic secret storage, most teams use the default settings for static values, manual rotation, and minimal auditing. This creates problems as your organization scales:
That’s why advanced teams adopt a mindset where secrets aren’t just stored, but created, injected, rotated, and expired automatically as part of each deployment. In this guide, we’ll show you how to implement secrets orchestration inside GitHub Actions using Doppler, focusing on:
This article is part one of a series on orchestrating CI/CD secrets and focuses specifically on GitHub Actions. (If you use Jenkins or CircleCI, stay tuned for upcoming guides.)
In GitHub Actions, secrets can live in three different places: (1) repository-level secrets, (2) environment-specific secrets (e.g., dev, staging, prod), and (3) organization-wide secrets. Secrets are injected at runtime, which keeps them out of source control, but managing them still creates hidden risks.
If you’ve ever rotated an API key, you’ve likely had to:
This process becomes harder to maintain with every new workflow, teammate, or environment. Secrets drift, and values get out of sync. Moreover, there’s no built-in visibility into how secrets are used or whether they’ve been replaced after exposure.
Static secret storage also makes enforcing short-lived credentials, least-privilege access, or auditability difficult, especially when reusing secrets across projects.
Rather than patching these issues one secret at a time, many teams begin centralizing their secrets strategy. In the next section, we’ll walk through how to connect GitHub Actions to a single control plane using Doppler, starting with how to safely migrate existing secrets.
Doppler has published a tutorial on connecting GitHub Actions. The tutorial includes instructions on how to safely transfer existing GitHub secrets into your Doppler project, ensuring no CI/CD workflow interruptions during the secrets migration.
To begin, we'll follow the GitHub Actions tutorial to connect our GitHub Actions and sync the existing secrets from GitHub to Doppler.
When the GitHub Action is run, the user will be prompted for 4 input variables:
As another option, the Doppler token, project, and config can also be run from secrets stored in the GitHub repository. To add secrets in a GitHub Repository, choose Settings > Secrets and Variables > Actions > Repository Secrets. Add the three secrets.
The workflow uses the Doppler CLI doppler secrets upload command to upload the secrets from GitHub into the Doppler project/config chosen. It also automatically deletes the three Doppler secrets as they will not be used again.
Once this process is repeated for all GitHub/Doppler environments, all of the CI/CD secrets are now securely stored on Doppler, and the Secrets store at GitHub no longer requires manual maintenance. When a new GitHub Action secret is required, it can be created in the Doppler dashboard(or via the CLI or API), and it will be automatically pushed to GitHub for use. Here, a new secret DOPPLER_SIDE_SECRET was created in the Doppler dashboardand immediately synced to GitHub:
Now that Doppler is securely managing secrets for our GitHub Actions, let's dig into some advanced techniques for secrets management in our CI/CD workflows.
You can easily rotate or update a secret with the Doppler UI, but it can also be updated via the API or CLI. The CLI command doppler secrets set uses parameters to update secrets:
While this manual updating is nice, let’s jump into automating the updating, rotating, and deletion of secrets for CI/CD workflows.
Regular rotation of secrets is a common security best practice. An even better approach is using automated secrets rotation on every deployment. Short-lived secrets limit the window of opportunity for hackers to access secure systems: they are not valid long enough for extensive damage to be done. One drawback to automatically rotating secrets can make logging and auditing a challenge in legacy systems.
Creating automated secrets rotation is possible on every deployment workflow by leveraging the Doppler CLI. The following workflow (see it on GitHub) uses just-in-time secret creation to create a secret that is used once before being deleted.
Let's walk through what is happening. On each push to main, several steps are taken:
Now, on every push, the API_KEY secret in the dev environment created, used just once, and then deleted. Using this GitHub Action code as a framework, teams can include steps to perform installations and deployments of code, leveraging Doppler to implement a one-time secret for the deployment.
"When was the secret last rotated?" "Who last made changes to the configuration?" Enterprise security frameworks (i.e., SOC-2, ISO 27001, and HIPAA) require audit logs to demonstrate compliance with the framework’s requirements. With secrets saved on GitHub, there is no audit log to help teams understand when and how changes are made to your secrets. With Doppler, there is a built-in audit trail that shows who made each change and when.
Doppler also supports exporting security event logs to external logging services like Datadog and Splunk, keeping all log activities in a centralized location.
The Doppler CLI makes auditing password changes easy. The log can be found by running doppler activity. The last two entries are Modified Secret and a Deleted Secret: both actions performed by the GitHub Action described above.
Automation has made deploying applications faster, but the way many teams handle secrets hasn’t kept up. Secrets often remain scattered across environments, rotated manually, and audited inconsistently. This creates risk, increases maintenance, and slows down delivery.
Centralizing secrets in a single control plane is a smarter approach. With Doppler, teams can manage the entire lifecycle: from injection to rotation and expiration, all within their GitHub Actions workflows. Secrets stay in sync, remain short-lived, and are fully auditable.
In this guide, you saw how to migrate secrets into Doppler, automate secret creation and deletion during deployments, and track changes using CLI logs and audit trails. This is the first in a series: upcoming guides will cover bringing the same orchestration model to Jenkins and CircleCI.
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.