最新的Microsoft GitHub Actions - GH-200免費考試真題
Which action type should be used to bundle a series of run steps into a reusable custom action?
正確答案: C
說明:(僅 Fast2test 成員可見)
What are two reasons to keep an action in its own repository instead of bundling it with other application code? Each correct answer presents a complete solution.
NOTE: Each correct answer is worth one point.
NOTE: Each correct answer is worth one point.
正確答案: A,C
說明:(僅 Fast2test 成員可見)
You are a DevOps engineer working on deployment workflows. You need to execute the deploy job only if the current branch name is feature-branch. Which code snippet will help you to implement the conditional execution of the job?
正確答案: C
說明:(僅 Fast2test 成員可見)
Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?
正確答案: E
說明:(僅 Fast2test 成員可見)
You have a GitHub repository that contains a composite action named Action1 and a workflow named Workflow1. Workflow1 contains the following steps:
* Calls Action1 in a step named report
* Passes count: ' 5 ' by using with
* Reads ${{ steps.report.outputs.summary )}
Action1 completes successfully, but the last step receives an empty value for summary.
You need to ensure that Action1 consumes the input of Workflow1 and exposes the expected output.
How should you complete the metadata file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

* Calls Action1 in a step named report
* Passes count: ' 5 ' by using with
* Reads ${{ steps.report.outputs.summary )}
Action1 completes successfully, but the last step receives an empty value for summary.
You need to ensure that Action1 consumes the input of Workflow1 and exposes the expected output.
How should you complete the metadata file? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.

正確答案:

Explanation:

GitHub composite actions use the inputs context to access parameters supplied by the calling workflow.
Therefore, ${{ inputs.count }} retrieves the value 5.
To expose a step output, the action must write a name=value pair to the file identified by
$GITHUB_OUTPUT. The command echo " summary=Processed $count items " > > " $GITHUB_OUTPUT
" creates the output named summary.
The action metadata must then map this step output to the composite action ' s declared output using ${{ steps.
build.outputs.summary }}. The internal step identifier must match the actual id: build.
The calling workflow can subsequently access the value through ${{ steps.report.outputs.summary }} because report is the caller ' s step identifier.
Which scopes are available to define custom environment variables within a workflow file? (Choose three.)
正確答案: C,D,F
說明:(僅 Fast2test 成員可見)
As a developer, you need to integrate a GitHub Actions workflow with a third-party code quality provider that uses the Checks API. How should you trigger a follow-up workflow?
正確答案: C
說明:(僅 Fast2test 成員可見)
What is a role of GitHub Marketplace when using GitHub Actions?
正確答案: C
說明:(僅 Fast2test 成員可見)
Which run: command will set a step ' s output?
正確答案: C
說明:(僅 Fast2test 成員可見)
What is the simplest action type to run a shell script?
正確答案: C
說明:(僅 Fast2test 成員可見)
Disabling a workflow allows you to stop a workflow from being triggered without having to delete the file from the repo. In which scenarios would temporarily disabling a workflow be most useful? (Choose two.)
正確答案: B,C
說明:(僅 Fast2test 成員可見)