Automation
GitHub Actions
Cheat sheet · https://pcornel.dk/topic.php?topic=5516
Answer
GitHub Actions is GitHub's built-in CI/CD and automation service. Workflows in .github/workflows run jobs of steps on GitHub-hosted or self-hosted runners when events such as push or pull_request happen.
Remember
- Pin third-party actions to a commit SHA.
- Grant GITHUB_TOKEN least privilege.
- Secrets are not passed to forked pull requests.
First checks
gh workflow list— workflowsgh run list --limit 10— recent runsactionlint— lint workflow files
Verify in this order
event → workflow → jobs on runners → steps
Where it usually breaks
Automation/controller success is not target-state proof; target config/state is not effective-runtime proof; effective state is not workload proof.
→ GitHub Actions · operational reference
| Layer | GitHub Actions operational reference |
|---|---|
| Runtime/ownership | GitHub Actions current · identify controller/worker/target ownership before mutation |
| Persistent intent | Versioned configuration/playbook/workflow with explicit dependencies and least-privilege identity |
| Verification | gh run list --limit 10; gh run view <run-id> --json status,conclusion,event,headSha,jobs |
| Expected interpretation | The workflow trigger, revision, permissions, runner environment, jobs and final conclusion are tied to one run ID, and deployment state is verified outside the workflow status. |
| Recovery boundary | Preserve correlation IDs + pre-state, then verify target/service independently after remediation |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5516