← All notes

Actions secrets are stored values you inject with the secrets context

Answer: Secrets let you store sensitive information in an organization, repository, or repository environment. Actions can only read a secret if you explicitly include the secret in a workflow. Use the secrets context to pass a secret to an action as an input or as an environment variable.

Limits and redaction

If a secret has not been set, an expression that references it returns an empty string. Secrets cannot be directly referenced in if: conditionals. Set the secret as a job-level environment variable and test that variable instead.

Actions automatically redacts the contents of GitHub secrets that are printed to workflow logs. Create repository secrets with gh secret set SECRET_NAME, or add environment and organization secrets with --env and --org.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Using secrets in GitHub Actions, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), About secrets (GitHub Docs source), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: GitHub Docs, Using secrets in GitHub Actions, CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc.; github/docs (GitHub), About secrets (GitHub Docs source), CC-BY-4.0 (https://raw.githubusercontent.com/github/docs/main/LICENSE). Copyright GitHub, Inc..

Cite this

Permanent ID: iil:note:v6znh0cq

iinventedlight. 2026. "Actions secrets are stored values you inject with the secrets context." iinventedlight Library, iil:note:v6znh0cq, version of 2026-11-17. https://iinventedlight.com/library/notes/github-actions-secrets/. License: CC-BY-4.0.

@misc{iil_note_v6znh0cq,
  author = {{iinventedlight}},
  title = {{Actions secrets are stored values you inject with the secrets context}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-17},
  url = {https://iinventedlight.com/library/notes/github-actions-secrets/},
  note = {Permanent ID iil:note:v6znh0cq. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/github-actions-secrets.md.