Configuration for GitHub Actionss
Configuration in GitHub Actions means passing values into workflows without hard-coding them. Variables hold non-sensitive settings, secrets store encrypted credentials such as API tokens, and contexts like github and env expose run information. Scopes include repository, environment and organisation levels.
Stage: Workflow Basics · Part of the GitHub Actions roadmap · Last reviewed 19 November 2026
What to learn in Configuration
- Create repository variables and read them with the vars context
- Store an API token as a secret and use it in a step
- Scope a secret to an environment with required reviewers
- Set env at workflow, job and step level and know which wins
- Write step outputs and pass them to later steps
Configuration interview questions
What is the difference between variables and secrets in Actions?
Variables store plain configuration that is visible in logs and settings, such as a region name. Secrets are encrypted, masked in logs and intended for sensitive values like tokens and passwords. Neither should be printed deliberately.
How does GITHUB_TOKEN differ from a personal access token?
GITHUB_TOKEN is an automatically generated token for each workflow run, scoped to the repository and expiring when the run ends. A personal access token belongs to a user, lasts longer and has broader access, so prefer GITHUB_TOKEN with minimal permissions.
Where Configuration fits in the GitHub Actions roadmap
Configuration belongs to the Workflow Basics stage (beginner level), which takes about 12 hours. Your first automation.
Other units in this stage
Back to the full GitHub Actions roadmap