GitHub Actions Retry Logic
Etsy 👶 Easy CI/CD
Beginner Mode

Start your terminal to use beginner mode.

Objective

A repository at /home/interview/repo has a deployment script that occasionally fails due to transient issues. The script ./scripts/flaky-deploy.sh fails on the first attempt but succeeds on retry.

Task

Complete the workflow at .github/workflows/deploy.yml that triggers on push events and implements automatic retry using the nick-fields/retry@v3 action (available locally at .github/actions/retry-action). The workflow should check out the code and execute ./scripts/flaky-deploy.sh with a timeout of 2 minutes and a maximum of 3 attempts.

File Path

  • Workflow: /home/interview/repo/.github/workflows/deploy.yml
  • Script: /home/interview/repo/scripts/flaky-deploy.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 →