Interview Prep/Real-World Interview/Write-a-pipeline tasks

Fix this GitHub Actions workflow that never triggers.

IntermediateHands-onWrite-a-pipeline tasks
Answer

Broken (saved as .github/workflow/ci.yaml):

on:
  push:
    branch: main
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: make test

Fixed (saved as .github/workflows/ci.yaml):

on:
  push:
    branches: [main]

Key trick → Two bugs: the folder must be workflows (plural), and the filter key is branches, not branch. Actions shows the invalid key as an error on the Actions tab; actionlint catches both locally.

All Real-World Interview questions Roadmap: Interview readiness

More on Write-a-pipeline tasks