Pcornel
Automation

GitHub Actions

Cheat sheet · https://pcornel.dk/topic.php?topic=5516

Back to the Topic

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 — workflows
  • gh run list --limit 10 — recent runs
  • actionlint — 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

LayerGitHub Actions operational reference
Runtime/ownershipGitHub Actions current · identify controller/worker/target ownership before mutation
Persistent intentVersioned configuration/playbook/workflow with explicit dependencies and least-privilege identity
Verificationgh run list --limit 10; gh run view <run-id> --json status,conclusion,event,headSha,jobs
Expected interpretationThe 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 boundaryPreserve 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

Confirmation

Confirm action

Continue?