StaffCoder
GitHub Actions
8 modules · 24 challengesSign up
Module 2 of 8 · 3 challenges

GitHub Actions Triggers & Events

Route one workflow by what happened: push, pull request and manual dispatch, with typed inputs and the event payload deciding which jobs run.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

3 challenges

Route The Jobs By Event

Sign up to unlock
—No data yeteasy
About this challenge

Route a four-job workflow by event and ref: declare the push, pull_request and workflow_dispatch triggers with their branch, tag and paths filters, then gate the deploy job to the default branch, the pull-request job to pull requests and the release job to tag pushes with job-level if conditions, because act does not apply the filters under on: push:.

Solved in a browser IDE and graded by tests. Sign up to solve

Dispatch Inputs And Event Payloads

Sign up to unlock
—No data yeteasy
About this challenge

Replace a hardcoded release workflow with typed workflow_dispatch inputs (string, choice and boolean with defaults), add schedule, repository_dispatch and pull_request triggers with the defined cron and activity types, record each payload's own fields in the run record, and gate two steps on the boolean input so exactly one of them runs per dispatch.

Solved in a browser IDE and graded by tests. Sign up to solve

Branch And Release Routing

STAR
Solving it completes the module
—No data yeteasy
About this challenge

Route one workflow across nine payloads: declare push, pull_request, workflow_dispatch, repository_dispatch and schedule with their filters, activity types, cron and typed inputs, then gate eight jobs by event name, ref, activity type and input so every payload runs exactly its own job set and records its own event fields, with each routing decision on a job-level if because act ignores the filters under on:.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.