#61 - GitHub Actions And Evolution Of CI/CD Tools
Build logic trapped in YAML makes every CI migration another rewrite.
17 min read
Andrey has been exploring GitHub Actions and has some insights to share. How have CI/CD solutions transformed over time, and what innovations do GitHub Actions bring to the table? Julien drops a few tools that could be useful for GitHub Actions users. We explored a bit history of CI/CD, we started with Jenkins and its DSL in Groovy. We compared that to the current DSL in YAML (GitHub Actions, Google Cloud Build, Azure DevOps, AWS CloudBuild). Andrey gave his tips on using Bash inside YAML and pipeline management. Mattias shared his experience on building pipeline.
The pipeline is the program you debug by pushing
Your build is a few hundred lines of shell script, and those lines live inside YAML files in .github/workflows/. Running that program the way CI runs it is the hard part. Pieces of it will run on your laptop, but the hosted runner’s preinstalled toolchain, its network position and the secrets it holds are difficult to reproduce there. So you edit a line, commit, push, wait for a runner, and watch it fail on a typo.
The waiting is the cheap part. The expensive part is that the logic belongs to whoever owns the file format. Move from Jenkins to GitHub Actions, from GitHub Actions to GitLab CI, from either to whatever the next job runs. You rewrite all of it. How your Docker image gets built was never in a place you could carry.
GitHub Actions is worth the attention anyway. It arrived late, after the rest of the field had made its mistakes in public. Three things it changed are worth copying even if you never use it. It reads a directory instead of a file. Every job surfaces as a status check you can require before a merge. And it landed the shared-step marketplace that Jenkins plugins and CircleCI orbs missed. None of that fixes the first problem, which lives outside the orchestrator.
What each generation of CI actually fixed
Start with the history, because every awkward thing in your current pipeline was a reasonable answer to a problem that no longer exists.
What really changed between Jenkins and GitHub Actions?
Four things moved: scheduling went from polling to events, the pipeline definition moved next to the code it builds, the server became somebody else’s problem, and steps became shareable.
CruiseControl came before Jenkins, and anyone who has seen its XML stops complaining about Groovy. Early Jenkins ran builds on a timer or after polling the version control system for changes, so the build server was the one asking. Chaining came next, through downstream jobs you wired together by hand, passing variables between them and hoping. Configuration as code arrived as the Job DSL plugin, which generated jobs from a separate repository, so pipelines and source code drifted apart.
Travis CI, CircleCI and Drone changed the model around 2011 and 2012. No server to run. A declarative YAML file committed with the project. Webhooks instead of polling, so the version control system announced the commit.
Jenkins answered in stages. The Workflow plugin reached 1.0 on 3 December 2014, a Groovy DSL “to describe an execution of a job”, and shipped as Pipeline with Jenkins 2.0 on 26 April 2016, which kept the chain of automation in the source tree. Restricted syntax followed when Declarative Pipeline went GA on 3 February 2017, and the imperative Groovy became Scripted Pipeline.
GitLab’s pitch was a GitHub you could run on your own hardware, and it shipped CI with the repository hosting at a point when GitHub still had none. GitHub Actions went generally available on 11 November 2019, and read as a direct answer.
A directory, not a file
That history explains why the next detail is easy to miss: it looks like packaging and behaves like design.
Why does it matter that GitHub Actions reads a directory?
Because one trigger per file deletes the conditional logic that single-file pipelines collect.
GitLab, CircleCI and Jenkins all start from one entry point. GitLab’s docs frame growth as splitting: “You can split one long .gitlab-ci.yml file into multiple files to increase readability”, using include. One pipeline, assembled from parts. GitHub Actions instead defines workflows in the .github/workflows directory, and “a repository can have multiple workflows, each of which can perform a different set of tasks”.
Three uses show up immediately. A monorepo gets a workflow per component, each scoped to the paths it owns. A build that runs on push and also reruns nightly becomes two files with two triggers instead of one file full of if conditions on the event name. A polyglot organisation puts the Docker build and deploy in one workflow the platform team owns, and lets each repository drop a second file for its own tests and linting.
Nothing is enforced until you configure it. Branch protection lets you require status checks before merging, and those checks can come from any workflow in the repository, so give required jobs unique names: a repeated name produces ambiguous results.
Scoping by paths is where this goes quietly wrong. When a path filter keeps a workflow from running, its checks “remain in a Pending state” and the pull request is “blocked from merging”. A docs-only change waits forever on a component build it was never meant to run. GitHub’s rule is flat: do not use path or branch filtering to skip a required workflow.
So move the filter down a level. Run the workflow on every pull request, have a first job work out which paths changed, and gate the rest on its output, because a job skipped by a conditional “will report its status as Success”. The irrelevant work does not run, and a failing component build still blocks the merge. Require that detection job’s check too. If the detector fails, the jobs that need it never run, and a check that never runs will not hold the merge.
The other cost is discoverability. Nothing lists which events fire which workflows, so you add a file, push, and see two runs where you expected one. Past about five workflows you need a convention, because the platform will not give you one.
Put the logic in an image, not in the YAML
Splitting the files makes each pipeline simpler to read. It does nothing about the shell scripts inside them, which is where the lock-in actually lives.
How do you build a pipeline that survives a change of CI system?
Put each step’s logic into a container image that knows how to build your repository, and leave the orchestrator to sequence images.
Take everything your Docker build step does, the tagging rules, the build arguments, the registry login, and move it into a shell script inside an image. The image assumes a repository layout, finds the Dockerfile where your convention says it will be, and runs. Your Terraform, lint and deploy steps get the same treatment. The orchestrator’s job shrinks to running image A, then image B, retrying when the runner dies, and reporting the result.
We got the first version of this wrong in a way worth repeating. The caller workflow passed every option through to every step, which meant the shared workflow had to know the full variable list of every image it might run. Routing configuration through the orchestrator is the part we are undoing. Because the repository layout is known, the step image can read its own configuration from a file of environment variables left in the repository, before the build starts. The caller passes almost nothing. We are mid-move, so treat that as the direction we are working in rather than a result.
Pinned tool versions inside the image solve a second problem: the Terraform that runs in CI is the Terraform that runs on a laptop, whatever version the runner image ships this month.
Testing the pipeline where you can see it
Images you can run locally lead straight to the question that started this whole thread.
Can you test a pipeline without pushing?
Partly. act runs your workflows locally through Docker, and step images run anywhere, but anything that depends on the hosted environment still needs a real run.
act is plain about its two uses: fast feedback on changes to .github/workflows/ without committing and pushing, and a local task runner that can replace a Makefile. We have one trial to report, and it failed: a complex C project, where act did not get the build running. That is one project rather than a pattern, and for most things we would expect it to work.
Two answers to that complaint come up, and both thin the YAML. One is to write the pipeline as a program in a language you already use. A Go binary carries its own configuration, the workflow file does little more than call it with --pr or --main, and the pipeline gets tested the way the rest of the code is. A Makefile is not the same trick: every Makefile grows its own private conventions and toolchain assumptions. The other answer is the step image.
Reusable actions are someone else’s code with your secrets
Thin YAML usually means calling actions written by somebody else, which moves the question from ergonomics to trust.
Is a marketplace action different from pulling a stranger’s Docker image?
No. Neither one tells you what it does without reading the source, and a tag on either can be repointed at new code.
Credit where it is due: GitHub built the registry others tried and did not land. Jenkins plugins ran on your own server, conflicted over library versions, and turned every upgrade into an afternoon. CircleCI orbs started public only, useless for an organisation whose pipelines reveal its deployment topology, though CircleCI has since added private orbs.
Read a few popular actions and the discomfort arrives on its own: they receive a lot of context, do a lot of work, and half of it is not obvious on a first pass. GitHub’s own guidance agrees. Pin references to a commit SHA, because that “helps mitigate the risk of a bad actor adding a backdoor to the action’s repository”. Read the source too. GitHub warns that a compromise of a single action “can be very significant”, because that action “would have access to all secrets configured on your repository”.
That wording is the worst case, not an automatic one. Secrets reach a run only when the workflow asks for them: “GitHub Actions can only read a secret if you explicitly include the secret in a workflow”, and “secrets are not automatically passed to reusable workflows”. The exposure is what the job hands the action in with: or env:, whatever the runner has on disk, and the permissions on that job’s GITHUB_TOKEN. Still plenty, and still worth pinning: a full commit SHA fixes the bytes you get, though not whatever the action downloads at run time. Dependabot and a .github/dependabot.yml keep the pin from quietly meaning stale.
Shared workflows have hard ceilings you find by hitting them. The documented limits are four connected levels of workflows and 20 unique reusable workflows from a single caller file, counting everything nested below.
Runners, and the API you are not allowed to reach
Where those jobs run is the next decision, and it is usually forced by something other than speed.
When do you need your own runners?
When the thing your pipeline must talk to is private, or when hosted minutes cost more than machines.
Hosted runners are small and still quick. Builds that took ten minutes on larger Jenkins workers finish in two on GitHub’s, and we can only guess at why: better network paths, faster disks, less contention. GitHub kept pushing on the hardware too, and in January 2024 moved standard Linux and Windows runners in public repositories to 4 vCPU machines with 16 GiB of memory. For mobile the arithmetic flips: macOS minutes bill at roughly ten times the Linux rate, so a farm of Macs can pay for itself.
The connection model is the part people get backwards. The runner reaches out. GitHub’s docs say the machine “must be able to make outbound HTTPS connections over port 443”, and nothing needs to reach in. It is the shape of AWS Systems Manager Session Manager, a shell “without the need to open inbound ports, maintain bastion hosts, or manage SSH keys”. If you are still exposing a build agent to the internet, you are running the 2015 design.
Which brings in the private API problem. ECS, Lambda and EC2 are public endpoints guarded by IAM, so a hosted runner can drive them with a token. A Kubernetes control plane, a Vault cluster or a self-hosted forge normally is not, and should not be. Then the runner has to live in the VPC, or you need a tunnel into it, and the short-lived WireGuard style of tunnel is the one to prefer. That is a real argument for managed services: every component you host yourself adds an endpoint to protect, audit and reach from CI.
Long-lived runners also collect residue: logs, images, caches, half a disk of goo. Jenkins solved that with ephemeral agents that provision and die per build, and recreating it on your own runners is work you are signing up for.
Stop sharing static keys with your CI
The worst thing on a shared runner is not leftover disk. It is a key with no expiry.
How do you give a pipeline cloud access without storing credentials?
Let the CI system mint a signed identity token per run, and let AWS exchange it for short-lived credentials bound to a role that names your repository and branch.
The reason to bother is on the record. CircleCI told every customer to rotate all secrets on 4 January 2023, after malware on an engineer’s laptop produced a valid session and the attacker exfiltrated customer data. Static cloud keys in there turn your week into forensics: which keys, used where, and can you prove it.
OIDC takes the long-lived cloud credential out of the CI system. GitHub’s AWS integration exchanges the workflow’s token for “a short-lived access token”, and the role’s trust policy carries the condition that matters, a sub claim such as repo:octo-org/octo-repo:ref:refs/heads/octo-branch. The docs are blunt about the requirement: define at least one condition, “so that untrusted repositories can’t request access tokens”. Give production its own role, scoped to the branch that deploys to it. It does not empty the provider: every other secret you keep there stays there, and a workflow an attacker can edit can get credentials for whatever role trusts it.
The token is a JWT with a short expiry of its own, and while it lives it can be presented to STS more than once, subject to the trust policy’s checks. Nothing stops a second role from trusting the same repository and branch, so “one role” is a property of the policies you wrote. Credentials from AssumeRoleWithWebIdentity last an hour by default, up to the role’s maximum session duration, and expire on that clock rather than when the job ends. AWS files the key you are replacing under “long-term credentials”, with no clock at all.
One correction to a thing we said on air: this is not SAML underneath. OpenID Connect is an identity layer on OAuth 2.0 that uses JSON Web Tokens for signed claims, minted per run and verified against the issuer.
Where you host the code is a commodity decision
All of this assumes you have chosen a forge, which used to be an interesting technical question.
Should you run your own version control and CI?
Only if someone owns patching it, because the failure mode we keep seeing is an unpatched server mining cryptocurrency for a stranger.
We have watched it happen at customers: a self-hosted GitLab, exposed, never updated, quietly busy. The public record matches. Rapid7 reported CVE-2021-22205 exploited in the wild from mid-2021, an unauthenticated remote code execution bug, with about half of roughly 60,000 internet-facing GitLab installations apparently unpatched months after the fix shipped. Self-hosting is a subscription paid in attention.
The open options are real. Gitea, Forgejo, hosted for free at Codeberg, and sourcehut all give you a forge with runners. The question is not whether they work. It is whether you have the time, and whether your build matrix, ARM and x86, Linux, Windows, macOS, iOS and Android, is one you want to assemble yourself.
Back in 2011 picking a platform was a genuine technology bet. Now it is a commodity with two or three obvious answers, and the interesting problems are elsewhere.
What this means for teams
The pattern across all of this is one decision repeated: keep the parts you own portable, and buy the parts that are now commodities. The orchestrator is a commodity. The runner fleet is a commodity until a private endpoint or a Mac farm says otherwise. How your repository gets built and deployed is not, and belongs in an artifact you can run on a laptop.
Four things worth doing this week:
- Split the biggest workflow file by trigger. One file per event, no
ifconditions on the event name, and let branch protection require the checks from workflows that run on every pull request, the path-detection job included. - Move one step out of YAML. Take the Docker build, put the script in an image, give it a convention for finding things, and run it locally once to prove the pipeline is no longer the only place it works.
- Pin every third-party action to a full commit SHA and switch on Dependabot for
github-actions, so pinning does not quietly mean stale. - Replace one static cloud key with OIDC. Start with the role that deploys to production, put the repository and branch in the trust policy, and delete the key afterwards rather than keeping it as a fallback.
Common questions, answered
Why does my GitHub Actions run fail with too many reusable workflows?
Flatten the call tree, because you have hit a documented ceiling rather than a bug. GitHub allows four connected levels of workflows, the caller included, and a maximum of 20 unique reusable workflows called from one caller file, counting everything nested underneath it. A caller that calls a shared workflow that calls another uses three of those four levels, so an error naming too many reusable workflows is the count of 20, not the depth. Collapse a layer by moving its steps into a composite action or a step image.
What should I do if my CI provider is breached?
Rotate every secret stored in that provider, then investigate the whole window in which the stolen copies still worked. CircleCI’s January 2023 guidance is the template: rotate all secrets held in project environment variables and contexts, and look for suspicious activity starting on December 16, 2022 and ending on the date you completed rotation, not on the date of the January 4, 2023 disclosure, because a stolen key keeps working until it is rotated. Static cloud keys are the painful case, because proving they were not used means reading CloudTrail or its equivalent. Afterwards, move cloud access to OIDC so there is no long-lived cloud key left in the provider to rotate.
Do I need a self-hosted runner to deploy to a private Kubernetes cluster?
You need either a runner inside the network or a private path into it, because a hosted runner cannot reach an endpoint that is not published. A self-hosted runner in the VPC is the common answer, and it needs only outbound HTTPS on port 443 to get its jobs, so nothing has to accept inbound connections. The trade is maintenance: long-lived runners accumulate logs, images and caches, so plan for ephemeral runners or scheduled cleanup from the start.
Related episodes
- Episode 9, Terraform in CI is the long version of the credentials argument, from a pipeline that holds the keys to the whole estate.
- Episode 38, Platform teams with Henrik covers shared build tooling across projects, the same instinct as the step image.
- Episode 39, Setting up tools and environments is about tool version drift between laptops and CI, the problem pinned step images exist to remove.
- Episode 46, Software supply chain attacks works through the dependencies you pull without reading, which is what a marketplace action is.
Resources
- About workflows settles the directory model: workflows live in
.github/workflows, and a repository can hold many. - Troubleshooting required status checks settles the difference between the two ways a job can be skipped: a path-filtered workflow leaves its checks pending and blocks the merge, while a job skipped by a conditional reports success.
- Security hardening for GitHub Actions is where the SHA pinning advice comes from, and sets out what a compromised action reaches.
- Configuring OpenID Connect in Amazon Web Services gives the trust policy condition that scopes a role to one repository and branch.
- CircleCI incident report for January 4, 2023 is the primary account of what happens when static secrets live in a CI provider, and sets the investigation window at December 16, 2022 through the completion of your own rotation.
- nektos/act runs workflows locally through Docker, and its README is honest about what it is: fast feedback and a task runner, not a guarantee of identical behaviour.
Since we recorded
March 2025 brought another example of this risk, when tj-actions/changed-files was compromised and its version tags were repointed at code that printed access keys, personal access tokens and private keys into workflow logs. CISA’s advice was to audit runs in the exposure window and treat those secrets as compromised. The reusable workflow ceiling moved in the other direction: GitHub’s current docs allow ten connected levels rather than four. We came back to the integration question itself in Episode 107, Continuous Integration in 2026, and to what happens when the OIDC trust policy stops matching after a repository rename in Episode 110, AWS Access Denied? Check your repo rename.
