Skip to content

Reusable Workflows

Medium — good to knowCI/CD & DevOps

ELI5 — The Vibe Check

Reusable Workflows are the DRY principle for GitHub Actions. Instead of copying the same CI config into 50 repos, you write it once and call it from everywhere. It's like making a function but for your entire CI pipeline. Change once, update everywhere.

Real Talk

Reusable workflows in GitHub Actions allow defining workflow logic in one repository and calling it from other workflows using the workflow_call trigger. They accept inputs and secrets, return outputs, and support nesting. This enables organizational CI/CD standardization.

Show Me The Code

# Caller workflow
jobs:
  ci:
    uses: org/shared-workflows/.github/workflows/ci.yml@main
    with:
      node-version: 20
    secrets:
      NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

When You'll Hear This

"All 30 repos call the same reusable workflow for CI." / "We updated the shared workflow once and every repo got the new linting rules."

Made with passive-aggressive love by manoga.digital. Powered by Claude.