RousselTMLEARNING

Article · GitHub Actions: from discovery to expertise

Best practices and troubleshooting

1. Speed and costs #

Fewer minutes, more feedback.

Levers #

Security measures
  • Dependency cache, paths filters, concurrency with cancellation, reduced matrices on pull requests and full ones on main.
  • timeout-minutes on every job: otherwise a stuck job consumes up to 6 hours.
  • Short artifact retention (retention-days) and Linux runners whenever possible (Windows and macOS cost more).

2. Debugging #

Understanding a failure.

Frequent errors #

SymptomLikely cause
Resource not accessible by integrationinsufficient GITHUB_TOKEN permissions
Workflow not triggeredbranches/paths filter, or workflow missing from the default branch (schedule, dispatch)
Empty secret on a fork PRnormal behaviour: secrets are not passed to forks
Job queued foreverno runner with the requested labels, or pending environment approval

Create the ACTIONS_STEP_DEBUG secret set to true (or rerun with "Enable debug logging") for detailed logs; act runs a workflow locally in Docker to iterate faster.

Checklist #

ItemCheck
Securityleast permissions, pinned actions, OIDC, no public self-hosted runner
Reliabilityrequired checks before merge, timeouts
Deliveryprotected environments, attestations, same image promoted
Governancelist of allowed actions at organization level, versioned reusable workflows

Commands to know #

Commands to know
  • act -j test : run the test job locally
  • gh run view <id> --log : full log
  • gh run rerun <id> --debug : rerun with debug logs

Sources #

Checked in November 2026: CI/CD platforms change every month, check versions and plans in the vendor's documentation.

📄 GitHub Actions best practices and troubleshooting →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

4.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Reusing and securing GitHub Actions workflows

Industrializing GitHub Actions: reusable workflows, composite, JavaScript and Docker actions, lea...

GitLab CI/CD best practices and troubleshooting

Running GitLab CI/CD day to day: speeding up pipelines, controlling compute minutes, organizing f...

GitHub Actions: concepts and how it works

Discover GitHub Actions: events, workflows, jobs, steps and actions, the Marketplace, hosted runn...

Writing GitHub Actions workflows

Mastering workflow syntax: triggers and filters, jobs and needs, matrices, if conditions, context...

GitHub Actions runners: hosted, self-hosted and ARC

Choosing where workflows run: hosted runners and images, larger runners, self-hosted runners (ins...

Delivering with GitHub Actions: GHCR, environments, OIDC and attestations

Building and deploying with GitHub Actions: publishing an image to GitHub Container Registry with...

Azure DevOps security, governance and best practices

Running Azure DevOps securely: permissions and groups, protected resources, pipeline authorizatio...

End-to-end CI/CD (5/5): GitHub Actions, GitLab CI, Jenkins and Argo CD in practice

Compare and use CI/CD tools: GitHub Actions, GitLab CI, Jenkins, Argo CD and Flux; a complete pip...

k6 in continuous integration and on Kubernetes (k6-operator)

Automate performance tests: k6 in GitHub Actions and GitLab CI with blocking thresholds, distribu...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!