A team wants each Copilot-generated pull request to publish a resumable agent handoff file. The file must record completed steps, rejected approaches, remaining work, and reviewer decisions. Reviewers must be able to download the file from the workflow run after the validation job completes. Which option completes the workflow?
name: publish-agent-handoff
on:
pull_request:
branches:
- main
permissions:
contents: read
pull-requests: read
jobs:
handoff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate handoff file
run: |
test -f .github/agent-handoff.md
grep -q "^Completed steps:" .github/agent-handoff.md
grep -q "^Rejected approaches:" .github/agent-handoff.md
grep -q "^Remaining work:" .github/agent-handoff.md
grep -q "^Reviewer decisions:" .github/agent-handoff.md
- name: Publish resumable state
(Missing value 1): actions/upload-artifact@v4
with:
(Missing value 2): agent-handoff
(Missing value 3): .github/agent-handoff.mdChoose an answer
Tap an option to check your answer.
Correct answer: Missing value 1 = uses Missing value 2 = name Missing value 3 = path.
Why this is the answer
The correct answer uses uses: actions/upload-artifact@v4, name: agent-handoff, and path: .github/agent-handoff.md. The actions/upload-artifact@v4 action is specifically designed to upload artifacts from a workflow run, making them available for download. The name parameter specifies the name of the artifact, which is how it will be identified and downloaded. The path parameter indicates the file or directory to upload as an artifact. Option 1 is incorrect because run executes shell commands, not actions, and artifact and file are not standard parameters for artifact uploads. Option 3 is incorrect because with is used to define inputs for an action, not the action itself, and path and name are in the wrong order for the upload-artifact action's primary parameters. Option 4 is incorrect because needs defines job dependencies, not artifact uploads, and artifact-name and upload-path are not the correct parameters for the upload-artifact action.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed