github · GitHub Actions Docs
How Tos Using secrets in GitHub Actions - GitHub Docs
Teaches how to securely store, access, and use encrypted secrets within GitHub Actions workflows to protect sensitive information like API keys and passwords.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
How Tos Using secrets in GitHub Actions - GitHub Docs
Teaches how to securely store, access, and use encrypted secrets within GitHub Actions workflows to protect sensitive information like API keys and passwords.
When To Use
Use when you need to pass sensitive credentials, tokens, or passwords into a GitHub Actions workflow without exposing them in plain text within your repository code.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/actions-how-tos-write-workflows-using-secrets-in-github-docs-workflow-guide.md | A guide explaining how to create and use secrets at the repository and environment levels within GitHub Actions workflows. | Questions about a guide explaining how to create and use secrets at the repository and environment levels within GitHub Actions workf... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti.text | A command line example demonstrating how to use the GitHub CLI to set a secret for a repository. | Exact payloads, commands, or snippets shown in A command line example demonstrating how to use the GitHub CLI to set a secret for a repository. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-2.text | A command line example demonstrating how to use the GitHub CLI to set a secret from a text file. | Exact payloads, commands, or snippets shown in A command line example demonstrating how to use the GitHub CLI to set a secret from a text file. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-3.text | A command-line example demonstrating how to use the GitHub CLI to set a secret for a specific environment. | Exact payloads, commands, or snippets shown in A command-line example demonstrating how to use the GitHub CLI to set a secret for a specific environment. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-4.text | A command-line example using the GitHub CLI to list secrets for a specific environment. | Exact payloads, commands, or snippets shown in A command-line example using the GitHub CLI to list secrets for a specific environment. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-5.text | A command-line example demonstrating how to use the GitHub CLI to log in with specific administrative organization scopes. | Exact payloads, commands, or snippets shown in A command-line example demonstrating how to use the GitHub CLI to log in with specific administrative organization sc... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-6.text | A command line example demonstrating how to use the GitHub CLI to set an organization-level secret. | Exact payloads, commands, or snippets shown in A command line example demonstrating how to use the GitHub CLI to set an organization-level secret. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-7.text | A GitHub CLI command used to set an organization-level secret with all visibility. | Exact payloads, commands, or snippets shown in A GitHub CLI command used to set an organization-level secret with all visibility. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-8.text | A command demonstrating how to use the GitHub CLI to set secrets for an organization and specific repositories. | Exact payloads, commands, or snippets shown in A command demonstrating how to use the GitHub CLI to set secrets for an organization and specific repositories. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-9.text | A GitHub CLI command used to list secrets within a specific organization. | Exact payloads, commands, or snippets shown in A GitHub CLI command used to list secrets within a specific organization. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-10.text | A YAML workflow snippet demonstrating how to pass GitHub repository secrets to actions as inputs and environment variables. | Exact payloads, commands, or snippets shown in A YAML workflow snippet demonstrating how to pass GitHub repository secrets to actions as inputs and environment vari... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-11.text | A YAML workflow snippet demonstrating how to access repository secrets using the env context in a GitHub Actions step. | Exact payloads, commands, or snippets shown in A YAML workflow snippet demonstrating how to access repository secrets using the env context in a GitHub Actions step. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-12.text | A GitHub Actions workflow step demonstrating how to access a secret using PowerShell syntax. | Exact payloads, commands, or snippets shown in A GitHub Actions workflow step demonstrating how to access a secret using PowerShell syntax. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-13.text | A YAML workflow snippet demonstrating how to access repository secrets using the secrets context within a step environment variable. | Exact payloads, commands, or snippets shown in A YAML workflow snippet demonstrating how to access repository secrets using the secrets context within a step enviro... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-14.text | A command line instruction demonstrating how to use GPG symmetric encryption with the AES256 algorithm to encrypt a secret file. | Exact payloads, commands, or snippets shown in A command line instruction demonstrating how to use GPG symmetric encryption with the AES256 algorithm to encrypt a s... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-15.text | A text example demonstrating how to add and commit a secret JSON file using Git commands. | Exact payloads, commands, or snippets shown in A text example demonstrating how to add and commit a secret JSON file using Git commands. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-16.text | A shell script demonstrating how to use a GPG passphrase stored in a GitHub Actions secret to decrypt a file. | Exact payloads, commands, or snippets shown in A shell script demonstrating how to use a GPG passphrase stored in a GitHub Actions secret to decrypt a file. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-17.text | A shell script demonstrating how to decrypt a secret within a GitHub Actions workflow. | Exact payloads, commands, or snippets shown in A shell script demonstrating how to decrypt a secret within a GitHub Actions workflow. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-18.text | A GitHub Actions workflow YAML example demonstrating how to pass a large secret to a shell script via an environment variable. | Exact payloads, commands, or snippets shown in A GitHub Actions workflow YAML example demonstrating how to pass a large secret to a shell script via an environment... |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-19.text | A command to encode a certificate file into base64 format for storage as a GitHub Actions secret. | Exact payloads, commands, or snippets shown in A command to encode a certificate file into base64 format for storage as a GitHub Actions secret. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-20.text | A command demonstrating how to encode a certificate file into base64 format for use as a GitHub Actions secret. | Exact payloads, commands, or snippets shown in A command demonstrating how to encode a certificate file into base64 format for use as a GitHub Actions secret. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-21.text | A command line example demonstrating how to use the GitHub CLI to set a secret named CERTIFICATE_BASE64 for a repository. | Exact payloads, commands, or snippets shown in A command line example demonstrating how to use the GitHub CLI to set a secret named CERTIFICATEBASE64 for a repository. |
examples/actions-how-tos-write-workflows-using-secrets-in-github-docs-github-acti-22.text | A GitHub Actions workflow YAML example that retrieves a base64-encoded secret and decodes it into a file. | Exact payloads, commands, or snippets shown in A GitHub Actions workflow YAML example that retrieves a base64-encoded secret and decodes it into a file. |
What This Skill Covers
-
- GitHub Actions / - How-tos / - Write workflows / - Choose what workflows do / - Use secrets
- Main sections:
Tool navigation,In this article,Creating secrets for a repository,Creating secrets for an environment,Creating secrets for an organization.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://docs.github.com/en/actions/how-tos/write-workflows/choose-what-workflows-do/use-secrets
