[{"id":"githubactionsintermediate-001","courseId":"github-actions-intermediate","domain":"workflow-runs-and-triggers","topic":"GITHUB_TOKEN events not creating runs","prompt":"A step uses GITHUB_TOKEN to change something in the repository. Which TWO event types always create a workflow run when GITHUB_TOKEN triggers them, with no approval step?","hint":"Look for the events the docs say always create workflow runs, whatever token triggers them.","explain":"GITHUB_TOKEN is the token Actions creates for each run. Events it triggers normally don't start new runs, which blocks accidental loops. A few manually or API-driven events are exempt from that rule.","source":"https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"workflow_dispatch","why":"It is an exception: workflow_dispatch always creates a run, even when GITHUB_TOKEN triggers it."},{"id":"b","text":"repository_dispatch","why":"It is the other exception: repository_dispatch always creates a run, even when GITHUB_TOKEN triggers it."},{"id":"c","text":"push to a branch","whyNot":"A push made with GITHUB_TOKEN doesn't start push-triggered workflows, which prevents recursive runs."},{"id":"d","text":"issues labeled","whyNot":"A label added with GITHUB_TOKEN doesn't start workflows that listen for the labeled event."},{"id":"e","text":"pull_request labeled","whyNot":"Other pull_request activity types, such as labeled, don't create runs when GITHUB_TOKEN makes the change."},{"id":"f","text":"issue_comment created","whyNot":"It is not an exception, so a comment made with GITHUB_TOKEN doesn't start a run."}],"answer":"ab","explanation":"Events triggered by GITHUB_TOKEN don't create new runs, except workflow_dispatch and repository_dispatch, which always do. pull_request opened, synchronize and reopened create only approval-required runs.","concept":"Events triggered by GITHUB_TOKEN don't create new runs, except workflow_dispatch and repository_dispatch, which always do. pull_request opened, synchronize and reopened create only approval-required runs.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["GITHUB_TOKEN events don't start runs, which blocks accidental recursion.","To start other workflows from a run, use a GitHub App or personal access token."]},{"id":"githubactionsintermediate-002","courseId":"github-actions-intermediate","domain":"workflow-runs-and-triggers","topic":"workflow_run chaining","prompt":"A workflow step pushes a commit, and a second workflow should run on that push. The step authenticates with GITHUB_TOKEN, and the second workflow never starts. Which credential should the step use?","hint":"The restriction comes from which identity makes the change, not from the token's permissions.","explain":"Each run gets an automatic token whose events are restricted so they can't start new runs, which prevents loops. The credential used to make a change decides whether other workflows start.","source":"https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows","interaction":{"type":"single"},"options":[{"id":"a","text":"The built-in GITHUB_TOKEN with a broader permissions block","whyNot":"Permissions limit what the token can access; they don't let its events start new runs."},{"id":"b","text":"A GitHub App installation access token or a personal access token","why":"Either credential can trigger events that GITHUB_TOKEN can't, so the second workflow starts."},{"id":"c","text":"A second copy of GITHUB_TOKEN from the default branch","whyNot":"Every run gets a GITHUB_TOKEN with the same restriction, so a copy changes nothing."},{"id":"d","text":"Re-running the first workflow with debug logging","whyNot":"Debug logging changes the log output, not which events start workflows."}],"answer":"b","explanation":"Events from GITHUB_TOKEN don't start new runs, but a GitHub App installation token or a personal access token can trigger them.","concept":"Events from GITHUB_TOKEN don't start new runs, but a GitHub App installation token or a personal access token can trigger them.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Chaining workflows from a run needs a credential other than GITHUB_TOKEN.","Store a GitHub App key or personal access token as a secret."]},{"id":"githubactionsintermediate-003","courseId":"github-actions-intermediate","domain":"workflow-runs-and-triggers","topic":"Pending runs canceled by default concurrency","prompt":"A workflow sets a concurrency group but not cancel-in-progress. One run is in progress, one run is pending, and a third run is queued in the same group. What happens to the pending run?","hint":"Look at what the default setting does to a run that is already pending.","explain":"A concurrency group lets only one run execute at a time. Extra runs wait as pending, and the defaults decide what happens to runs that are already waiting.","source":"https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency","interaction":{"type":"single"},"options":[{"id":"a","text":"It keeps its place and runs after the third run","whyNot":"A newly queued run takes the pending slot, so the older pending run doesn't survive."},{"id":"b","text":"It is canceled, and the running run is canceled too","whyNot":"Canceling the running run requires cancel-in-progress: true, which isn't set here."},{"id":"c","text":"It is canceled, and the third run takes its place as pending","why":"By default, the existing pending run is canceled and the newly queued run takes its place."},{"id":"d","text":"It keeps running alongside the in-progress run","whyNot":"A concurrency group allows at most one running job or workflow at a time."}],"answer":"c","explanation":"By default a newly queued run cancels the existing pending run in its group, but leaves the running run alone.","concept":"By default a newly queued run cancels the existing pending run in its group, but leaves the running run alone.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Default concurrency cancels pending runs, not running ones.","Add cancel-in-progress: true only when stopping the running run is acceptable."]},{"id":"githubactionsintermediate-004","courseId":"github-actions-intermediate","domain":"workflow-runs-and-triggers","topic":"Scheduled runs on default branch only","prompt":"After a user changes the repository's default branch, scheduled workflows run on the new default branch, and that user becomes the actor for those runs.","hint":"Think about which repository events can change where a schedule runs and who it is credited to.","explain":"A scheduled workflow is tied to a branch and to an actor, the user GitHub credits with its runs. Some repository events can change either of these.","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":"A default-branch change moves the branch scheduled workflows run on, and the user who made the change becomes their actor."},{"id":"b","text":"False","whyNot":"Scheduled runs don't stay on the old branch; the default-branch change moves them to the new one."}],"answer":"a","explanation":"Scheduled workflows run on the repository's default branch, and changing that branch also changes their actor.","concept":"Scheduled workflows run on the repository's default branch, and changing that branch also changes their actor.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Scheduled runs follow the default branch and the user who changed it.","Notifications for scheduled runs go to whoever last edited the cron line."]},{"id":"githubactionsintermediate-005","courseId":"github-actions-intermediate","domain":"workflow-runs-and-triggers","topic":"Multiple events firing together","prompt":"A workflow runs on issues with the types opened and labeled. An issue is opened with two labels already attached. How many workflow runs start?","hint":"Count each matching activity separately, including the opened one.","explain":"A workflow that lists several activity types starts a run for each matching activity that occurs. Activities happening at the same moment don't merge into one run.","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":"One run, because the issue is only opened once","whyNot":"Each matching activity starts its own run, so the labeled activities count too."},{"id":"b","text":"Two runs, one for each label","whyNot":"The opened activity also starts a run, so the total is more than two."},{"id":"c","text":"Three runs: one for opened and one for each labeled event","why":"Each matching activity starts a run: the opened event plus two labeled events make three."},{"id":"d","text":"Four runs, because opened and labeled each fire twice","whyNot":"Each activity starts one run per occurrence; the events don't fire twice each."}],"answer":"c","explanation":"Each matching event activity starts its own run, so simultaneous activities produce several runs.","concept":"Each matching event activity starts its own run, so simultaneous activities produce several runs.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Simultaneous triggers each start a run; they never merge.","In a multi-event on: block, every event needs a colon, even unconfigured ones."]}]