[{"id":"githubactionsbeginner-001","courseId":"github-actions-beginner","domain":"workflow-runs-and-triggers","topic":"Manual run steps","prompt":"You want to start a workflow by hand from the GitHub website. Put these steps for a manual run in the order the docs give them.","hint":"Think about which page has to be open before its button appears.","explain":"Manual starts are offered in the web interface only for some workflows. The workflow file needs a particular trigger, and it must sit on the default branch before the button works.","source":"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow","interaction":{"type":"sort","items":[{"text":"Click Actions under the repository name.","why":"The Actions tab sits under the repository name, and workflows are reached from there."},{"text":"In the left sidebar, click the name of the workflow.","why":"The Run workflow button belongs to one workflow's page, so that page has to be open first."},{"text":"Click the Run workflow button above the list of workflow runs.","why":"The button sits on the chosen workflow's page, above its run list."},{"text":"Open the Branch dropdown and click the branch to run on.","why":"The docs have you choose the branch the workflow runs on after the button is clicked."}]},"options":[],"answer":"o:abcd","explanation":"The Run workflow button appears on a workflow's own page in the Actions tab, and only for workflows whose file uses the workflow_dispatch trigger.","concept":"The Run workflow button appears on a workflow's own page in the Actions tab, and only for workflows whose file uses the workflow_dispatch trigger.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["A workflow only shows a Run workflow button if its file uses the workflow_dispatch trigger."]},{"id":"githubactionsbeginner-002","courseId":"github-actions-beginner","domain":"workflow-runs-and-triggers","topic":"Default workflow name","prompt":"A workflow file at .github/workflows/deploy.yml has no name: key at the top. What label does its entry get on the Actions tab?","hint":"When a label is missing, think about what else could identify the file.","explain":"Each workflow appears on the Actions tab under a label. The top-level name: key supplies that label, so consider what the label falls back to when the key is left out.","source":"https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax","interaction":{"type":"single"},"options":[{"id":"a","text":".github/workflows/deploy.yml","why":"Without name:, GitHub shows the workflow file path relative to the repository root."},{"id":"b","text":"deploy","whyNot":"GitHub does not strip the folder and extension; it shows the path relative to the repository root."},{"id":"c","text":"build","whyNot":"The job ID names a job inside a run, not the workflow itself."},{"id":"d","text":"Untitled workflow","whyNot":"GitHub has no placeholder title; it falls back to the file path."}],"answer":"a","explanation":"The top-level name key sets a workflow's display name; if it is omitted, GitHub shows the workflow file path relative to the repository root.","concept":"The top-level name key sets a workflow's display name; if it is omitted, GitHub shows the workflow file path relative to the repository root.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","code":"on: push\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - run: echo hi","takeaways":["Add a top-level name: key so the Actions tab shows a readable label."]},{"id":"githubactionsbeginner-003","courseId":"github-actions-beginner","domain":"workflow-runs-and-triggers","topic":"push trigger","prompt":"A workflow starts with on: push and no filters. Which TWO statements about when it runs are true?","hint":"Think about which refs a push event covers, and what filters narrow.","explain":"A push event fires when commits or tags are sent to a repository. Filters under the push key narrow which branches or tags count, and the event data records who pushed.","source":"https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"It runs for pushes that affect either a branch or a tag, since neither filter is set.","why":"With neither branches nor tags filters defined, the workflow runs for events affecting either branches or tags."},{"id":"b","text":"It runs only for pushes to the default branch.","whyNot":"A bare push trigger is not limited to the default branch; it also covers workflows that are not merged there."},{"id":"c","text":"It runs for a push of a workflow file that exists only on a feature branch.","why":"The push trigger covers workflows that are not merged into the default branch."},{"id":"d","text":"The 'pushed by' field shows the commit author.","whyNot":"The Actions UI's pushed by field shows the account that pushed, not the author or committer."},{"id":"e","text":"Branches and branches-ignore can both be set for push.","whyNot":"You cannot use both branches and branches-ignore for the same event in one workflow."},{"id":"f","text":"It never runs on tag pushes.","whyNot":"The push trigger runs when you push a commit or a tag, so tag pushes count when no filter narrows them."}],"answer":"ac","explanation":"With neither branches nor tags filters set, a push workflow runs for events affecting branches or tags, including workflows not merged into the default branch.","concept":"With neither branches nor tags filters set, a push workflow runs for events affecting branches or tags, including workflows not merged into the default branch.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["A bare on: push covers every branch and tag; add filters to narrow it."]},{"id":"githubactionsbeginner-004","courseId":"github-actions-beginner","domain":"workflow-runs-and-triggers","topic":"pull_request default activity types","prompt":"With on: pull_request and no types key, the workflow runs when a new commit is pushed to the pull request's head branch.","hint":"Some activity types fire by default. Check which ones the default set holds.","explain":"A pull_request trigger fires on several kinds of activity, such as opening, new commits, and labels. A types key picks which count; without it, a fixed default set applies.","source":"https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","why":"With no types key, the default set applies, and synchronize covers a new commit pushed to the head branch."},{"id":"b","text":"False","whyNot":"The default set includes synchronize, which fires when the head branch is updated, so no types key is needed for this."}],"answer":"a","explanation":"With no types key, a pull_request workflow runs for opened, synchronize and reopened activity only; other types like labeled must be listed.","concept":"With no types key, a pull_request workflow runs for opened, synchronize and reopened activity only; other types like labeled must be listed.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Add types: to a pull_request trigger to react to labeled, closed or other activity."]},{"id":"githubactionsbeginner-005","courseId":"github-actions-beginner","domain":"workflow-runs-and-triggers","topic":"Manual runs need default-branch file","prompt":"You add a workflow_dispatch trigger to a workflow file on a feature branch and try to start it from the Actions tab. What happens?","hint":"Think about which copy of the workflow file the trigger listens through.","explain":"Some triggers only listen once the workflow file exists in a particular place in the repository. Manual starts follow the same kind of rule, so check where the file must live.","source":"https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow","interaction":{"type":"single"},"options":[{"id":"a","text":"The trigger receives no events until the file is on the default branch.","why":"A workflow_dispatch trigger only receives events when the workflow file is on the default branch."},{"id":"b","text":"It runs from the feature branch as soon as the file is pushed.","whyNot":"Pushing the file to a feature branch is not enough for manual runs to be received."},{"id":"c","text":"It runs only if the feature branch is named main.","whyNot":"The branch name does not matter; the default branch's copy of the file is what counts."},{"id":"d","text":"It runs only if the workflow also has a push trigger.","whyNot":"A manual trigger works without any other trigger; it only needs the file on the default branch."}],"answer":"a","explanation":"workflow_dispatch receives events only when the workflow file is on the default branch, so a file that exists only on a feature branch can't be started manually.","concept":"workflow_dispatch receives events only when the workflow file is on the default branch, so a file that exists only on a feature branch can't be started manually.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Merge a workflow_dispatch workflow to the default branch before expecting manual runs."]}]