What does a GitHub Actions workflow look like at a basic level?
BeginnerConceptGitHub features, history rewriting and scale
Answer
YAML in .github/workflows/ with triggers (on), jobs, and steps that either run commands or call actions. Jobs run in parallel on runners by default and can depend on each other via needs.
name: ci
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm test
More on GitHub features, history rewriting and scale
What are GitHub environments and what protection do they offer?IntermediateWhat is a GitHub Release and how does it relate to a Git tag?BeginnerWhat are the permissions of `GITHUB_TOKEN` and how do you restrict them?IntermediateWhy do fork PRs get no secrets, and what is `pull_request_target`?AdvancedWhat is the difference between a GitHub fork and a clone?BeginnerWhat is a branch protection rule versus a ruleset?Intermediate