Pcornel
Automation · GitHub Actions

Secrets

Cheat sheet · https://pcornel.dk/topic.php?topic=5526

Back to the Topic

Answer

Secrets in GitHub Actions are encrypted values stored at repository, environment or organization level and read as ${{ secrets.NAME }}. They are masked in logs and not passed to forked pull requests.

Remember

  • Secrets exist at repository, environment and organization level.
  • They are masked in logs.
  • Secrets are not available to workflows from forks.

First checks

  • gh secret list — repo secrets
  • gh secret list --env <env> — environment secrets
  • OIDC (id-token: write) instead of cloud keys — federation

Verify in this order

secret → environment/job → masked env var

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5526

Confirmation

Confirm action

Continue?