BM: Baca dalam Bahasa Melayu
World C2: Container Pipelines
Reusable workflows and composite actions
You will learn: to write a pipeline once and share it across your apps.
Checked with GitHub Actions 2026-10 on 31 Oct 2026
The problem
Kedai Kancil has a web image and an API image. Both workflows hold the same 30 build lines. You fix a bug in one. What about the other?
Pick one answer.
Watch
Tap the line that names the blank to fill in.
0 of 1 found
Recap from World 7. A reusable workflow: A workflow other workflows can call, made with on: workflow_call. is head office’s standard recipe. workflow_call lets others call it. Inputs are the blanks.
Watch
Pick an event. Press Run and watch the line.
Two jobs, web and api, each call build-image.yml with their own folder. Both run side by side and turn green.
Workflow file .github/workflows/ci.yml
name: CI on: push: branches: [main] permissions: contents: read packages: write jobs: web: uses: ./.github/workflows/build-image.yml with: folder: web api: uses: ./.github/workflows/build-image.yml with: folder: api
The line
Push to main · main
Two jobs call one recipe, each with its own folder. Press Run. Fix the recipe once, and both apps get the fix.
Watch
Tap the line that makes this a composite action.
0 of 1 found
A composite action: A pre-mixed spice blend: a few steps saved as one action. It runs as one step in your job. is a pre-mixed spice blend: steps in one jar. In a job, uses: ./.github/actions/setup-shop runs it as one step.
Try it
Which one is it?
Drag a card into a box. Or tap the card, then tap the box.
Predict
The caller’s token has packages: read. The called workflow asks for packages: write. What happens?
Pick one answer.
You did it!
You can now share one pipeline across many apps.
Go deeper (optional)
Call a reusable workflow from another repo like an action: owner/repo/.github/workflows/build.yml@ref. Pin that ref to a full SHA, as World C4 explains. In the log, a composite action is one step. Open it to see inside.
Real rep (optional):
Real mission
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Kedai Kancil ada image web dan image API. Kedua-dua workflow ada 30 baris build yang sama. Anda baiki satu pepijat dalam satu fail. Yang satu lagi macam mana?
Ulang kaji dari Dunia 7. reusable workflow (workflow guna semula) ialah resipi standard ibu pejabat. workflow_call benarkan orang lain panggilnya. Inputs ialah tempat kosong.
Dua job panggil satu resipi, setiap satu dengan foldernya. Tekan Run. Baiki resipi sekali, dan kedua-dua aplikasi dapat pembaikan.
Composite action ialah rempah siap campur: beberapa langkah dalam satu balang. Dalam job, uses: ./.github/actions/setup-shop jalankannya sebagai satu langkah.
Yang mana satu?
Token pemanggil ada packages: read. Workflow yang dipanggil minta packages: write. Apa jadi?
Kini anda boleh kongsi satu pipeline dengan banyak aplikasi.
You finished this before. Practice is always welcome!
Official docs: Reuse workflows · Creating a composite action · Reusing workflow configurations
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?