Reusable Workflow with Input Parameters
Adobe ☯️ Medium CI/CD
Beginner Mode

Start your terminal to use beginner mode.

Objective

A repository at /home/interview/repo contains multiple applications that share common build steps. The team wants to eliminate duplication by creating a centralized reusable workflow. The repository has the upload-artifact action available locally at .github/actions/upload-artifact.

Task

Complete two workflows. First, complete the reusable workflow at .github/workflows/shared-build.yml that accepts an input parameter app-name (type: string), uses container image node:20-slim, runs ./build.sh with the app name, and uploads a build artifact named build-<app-name>. Second, complete the caller workflow at .github/workflows/deploy.yml that triggers on push and calls the reusable workflow with app-name: "frontend".

File Path

  • Reusable workflow: /home/interview/repo/.github/workflows/shared-build.yml
  • Caller workflow: /home/interview/repo/.github/workflows/deploy.yml
  • Build script: /home/interview/repo/build.sh

Terminal requires a larger screen

Open this page on a desktop or tablet (≥ 768px) to launch the terminal and practice hands-on.

Linux Terminal Environment

Write and execute your solution in the terminal below.

Sign In

Track

Question Difficulty Company Access
Need more practice in this area? Explore more questions →