
[2025年03月] 最新のGitHub-Actions試験問題集には合格保証が付きます
信頼できるGitHub Certification GitHub-Actions問題集PDFで2025年03月16日に更新された問題
GitHub GitHub-Actions 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
| トピック 4 |
|
| トピック 5 |
|
質問 # 10
You need to make a script to retrieve workflow run logs via the API. Which is the correct API to download a workflow run log?
- A. GET /repos/:owner/:repo/actions/artifacts/logs
- B. POST /repos/:owner/:repo/actions/runs/:run_id
- C. POST /repos/:owner/:repo/actions/runs/:run_id/logs
- D. GET /repos/:owner/:repo/actions/runs/:run_id/logs
正解:D
解説:
The GET /repos/:owner/:repo/actions/runs/:run_id/logs API endpoint is used to retrieve the logs of a specific workflow run identified by run_id. This is the correct method for downloading logs from a workflow run.
質問 # 11
Which files are required for a Docker container action in addition to the source code? (Choose two.)
- A. action.yml
- B. metadata.yml
- C. Actionfile
- D. Dockerfile
正解:A、D
解説:
Dockerfile: TheDockerfileis required for Docker container actions. It defines the environment for the action, specifying the base image, dependencies, and any commands to set up the action's runtime inside the container.
action.yml: Theaction.ymlfile is required for all GitHub Actions, including Docker container actions. It contains metadata about the action, including the inputs, outputs, and the runtime environment (which in this case is Docker, defined underruns.using).
質問 # 12
As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)
- A. Create a marketplace partition to publish reusable automation for the company.
- B. Store shared corporate actions in subfolders in a defined and documented internally accessible repository.
- C. Create workflow templates and store them in the organization's .github repository.
- D. Create reusable actions and workflows that can be called from other workflows.
正解:C、D
解説:
Creating workflow templates in the organization's .github repository allows the organization to standardize workflows and make them easily reusable across multiple repositories. This ensures consistency and simplifies maintenance.
Creating reusable actions and workflows that can be called from other workflows helps modularize and standardize automation tasks. These reusable components can be maintained centrally and called from different workflows across repositories.
質問 # 13
What are the advantages of using a matrix strategy in a job definition? (Choose two.)
- A. It can run up to 512 jobs per workflow run.
- B. It can decrease the costs for running multiple combinations of programming language/operating systems.
- C. It can test code in multiple operating systems.
- D. It can test code in multiple versions of a programming language.
正解:C、D
解説:
A matrix strategy allows you to define different versions of a programming language (or any other environment setting) and run tests on each version simultaneously. This is particularly useful for testing code compatibility across different versions of a language.
A matrix strategy can also be used to test code on multiple operating systems (e.g., Windows, macOS, Linux) by defining these operating systems as matrix variables. This enables cross-platform testing within the same workflow.
質問 # 14
You need to trigger a workflow using the GitHub API for activity that happens outside of GitHub. Which workflow event do you use?
- A. repository_dispatch
- B. workflow_run
- C. deployment
- D. check_suite
正解:A
解説:
Therepository_dispatchevent allows you to trigger a workflow in response to external activity. It is commonly used when you need to trigger a workflow from outside GitHub, such as from another system or service, by sending a request to the GitHub API. This event provides flexibility to integrate with various external systems and trigger workflows in a GitHub repository.
質問 # 15
What can be used to set a failed status of an action from its code?
- A. output variable
- B. composite run step
- C. a non-zero exit code
- D. Dockerfile CMD
- E. JavaScript dist/ folder
- F. @actions/github toolkit
正解:C
解説:
A non-zero exit code is used to set the status of an action to "failed" in GitHub Actions. When the action's script or code exits with a non-zero status, it indicates failure, and GitHub will mark the action as failed.
質問 # 16
Which default GitHub environment variable indicates the owner and repository name?
- A. GITHUB REPOSITORY
- B. GITHUB WORKFLOW REPO
- C. ENV REPOSITORY
- D. REPOSITORY NAME
正解:D
解説:
The GITHUB_REPOSITORY environment variable contains the owner and repository name in the format owner/repository. It is automatically provided by GitHub Actions and can be used to reference the repository in workflows.
質問 # 17
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?
- A. Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.
- B. It is not possible; if an action is in the marketplace, its use cannot be restricted.
- C. Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.
- D. Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.
正解:D
解説:
The best way for an enterprise to control which GitHub Actions run is by creating a list of approved actions as an enterprise policy. This approach restricts workflows to only use the actions that are explicitly allowed, ensuring security and compliance within the organization.
質問 # 18
Which workflow event is used to manually trigger a workflow run?
- A. status
- B. create
- C. workflow_run
- D. workflow_dispatch
正解:D
解説:
The workflow_dispatch event is used to manually trigger a workflow run in GitHub Actions. You can specify this event in the workflow file to allow users to manually trigger the workflow from the GitHub UI, often with optional input parameters.
質問 # 19
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.)
- A. A workflow needs to be changed from running on a schedule to a manual trigger
- B. A workflow sends requests to a service that is down.
- C. A runner needs to have diagnostic logging enabled.
- D. A workflow error produces too many, or wrong, requests, impacting external services negatively.
- E. A workflow is configured to run on self-hosted runners
正解:B、D
解説:
If a workflow depends on an external service that is down, disabling the workflow temporarily will prevent it from running and sending requests to the service, thus avoiding failed requests or unnecessary retries.
If a workflow is causing a negative impact on external services by generating too many requests or incorrect data due to a bug, temporarily disabling the workflow will stop this behavior while the issue is fixed.
質問 # 20
How can GitHub Actions encrypted secrets be used in if: conditionals within a workflow job?
- A. Create a job dependency that exposes the encrypted secret as a job output, which can then be leveraged in a subsequent dependent job.
- B. Set the encrypted secret as a job-level environment variable and then reference the environment variable within the conditional statement.
- C. Use a workflow command to expose the encrypted secret via a step's output parameter and then use the step output in the job's if: conditional.
- D. Use the secrets context within the conditional statement, e.g. ${{ secrets.MySuperSecret }}.
正解:D
解説:
GitHub Actions encrypted secrets can be accessed in workflows using thesecretscontext. You can directly reference the secret within anif:conditional using${{ secrets.MySuperSecret }}to determine whether a job or step should run based on the secret's value.
質問 # 21
Which of the following scenarios requires a developer to explicitly use the GITHUB_TOKEN or github.token secret within a workflow? (Choose two.)
- A. making an authenticated GitHub API request
- B. passing the GITHUB_TOKEN secret to an action that requires a token as an input
- C. checking out source code with the actions/checkout@v3 action
- D. assigning non-default permissions to the GITHUB_TOKEN
正解:A、B
解説:
Some actions may require a GITHUB_TOKEN as an input to authenticate and perform specific tasks, such as creating issues, commenting on pull requests, or interacting with the GitHub API. In such cases, you would need to explicitly pass the token to the action.
When making an authenticated GitHub API request, the GITHUB_TOKEN is required to authenticate the request. This token is automatically provided by GitHub in the workflow, and it must be explicitly used when interacting with the GitHub API.
質問 # 22
You are a developer working on developing reusable workflows for your organization. What keyword should be included as part of the reusable workflow event triggers?
- A. workflow_call
- B. workflow_run
- C. pull_request
- D. check_run
正解:A
解説:
The workflow_call event is used to trigger a reusable workflow from another workflow. This allows you to create workflows that can be reused in multiple places within your organization, enabling better modularity and reducing duplication.
質問 # 23
As a developer, you need to create a custom action written in Python. Which action type should you choose?
As a developer, you need to create a custom action written in Python. Which action type should you choose?
- A. JavaScript action
- B. composite run step
- C. Python action
- D. Docker container action
正解:D
解説:
ADocker container actionis ideal for custom actions that require specific environments or dependencies, such as Python. By creating a Docker container, you can define the environment with the necessary Python version and dependencies, and your Python code can run inside that container.
質問 # 24
What is the right method to ensure users approve a workflow before the next step proceeds?
- A. granting users repository approval permissions
- B. adding users as required reviewers for an environment
- C. creating a branch protection rule and only allow certain users access
- D. grantingusers workflow approval permissions
正解:B
解説:
GitHub Actions allows you to configure environment protection rules, where you can require specific users or teams to approve the deployment before the workflow proceeds to the next step. This ensures that the required reviewers approve the workflow before any sensitive actions (such as deployment) occur.
質問 # 25
......
2025年最新の実際にある検証済みのGitHub-Actions問題集:https://www.passtest.jp/GitHub/GitHub-Actions-shiken.html
必ず合格できるGitHub GitHub-Actions試験で正確な74問題と解答あります:https://drive.google.com/open?id=11_tx5dPpS38-Ff9JSJjlvw6l9j59Ekn_