[2025年05月11日] 実際のGitHub-Actions試験問題集は2025年最新のGitHub練習試験合格させます
2025年最新の実際にあるGitHub-Actions問題集テストエンジン試験問題はここにある
質問 # 14
You installed specific software on a Linux self-hosted runner. You have users with workflows that need to be able to select the runner based on the identified custom software. Which steps should you perform to prepare the runner and your users to run these workflows? (Choose two.)
- A. Add the label linux to the runner.
- B. Inform users to identify the runner based on the group.
- C. Configure the webhook and network to enable GitHub to trigger workflow.
- D. Create the group custom-software-on-linux and move the runner into the group.
- E. Add the label custom-software to the runner.
正解:B、E
解説:
Once the runner is properly configured and labeled, users should be informed to select the specific runner by identifying the label or group name when defining the runner in their workflows.
Adding a custom label (likecustom-software) to the runner makes it easier for users to select the runner in their workflows by using theruns-onkey, which allows them to choose this specific runner based on its label.
質問 # 15
What metadata file in a custom action defines the main entry point?
- A. action.yml
- B. index.js
- C. main.yml
- D. action.js
正解:A
解説:
The action.yml file is the metadata file in a custom GitHub Action that defines the main entry point, including information such as the inputs, outputs, description, and the runs key that specifies the main entry point (e.g., a script or a Docker container).
質問 # 16
As a developer, your self-hosted runner sometimes looses connection while running jobs. How should you troubleshoot the issue affecting your self-hosted runner?
- A. Access the self-hosted runner's installation directory and look for log files in the _diag folder.
- B. Locate the self-hosted runner in your repository's settings page and download its log archive.
- C. Set the DEBUG environment variable to true before starting the self-hosted runner to produce more verbose console output.
- D. Start the self-hosted runner with the --debug flag to produce more verbose console output.
正解:A
解説:
When troubleshooting a self-hosted runner, you can access the_diagfolder located in the self-hosted runner's installation directory. This folder contains diagnostic logs that can help you identify the root cause of issues, such as connection problems.
質問 # 17
In which scenarios could the GITHUB_TOKEN be used? (Choose two.)
- A. to create a repository secret
- B. to leverage a self-hosted runner
- C. to add a member to an organization
- D. to publish to GitHub Packages
- E. to read from the file system on the runner
- F. to create issues in the repo
正解:D、F
解説:
The GITHUB_TOKEN is automatically provided by GitHub in workflows and can be used to authenticate API requests to GitHub, including publishing packages to GitHub Packages.
The GITHUB_TOKEN is also used to authenticate API requests for actions like creating issues, commenting, or interacting with pull requests within the same repository.
質問 # 18
As a developer, you are using a Docker container action in your workflow. What is required for the action to run successfully?
- A. The job env must be set to a Linux environment.
- B. The referenced action must be hosted on Docker Hub.
- C. The job runs-on must specify a Linux machine with Docker installed.
- D. The action must be published to the GitHub Marketplace.
正解:C
解説:
For a Docker container action to run in a GitHub Actions workflow, the runner must have Docker installed.
The runs-on attribute of the job should specify an environment that supports Docker, typically a Linux environment (e.g., ubuntu-latest), since Docker is widely supported and commonly used in Linux-based environments.
質問 # 19
As a developer, you want to review the step that caused a workflow failure and the failed step's build logs.
First navigate to the main page of the repository on GitHub. Which section contains the step failure information?
- A. Pull requests
- B. Actions
- C. Code
- D. Issues
- E. Insights
正解:B
解説:
The Actions tab on the main page of the repository is where you can find detailed information about the workflow runs, including step failures and build logs. You can review the status of each job and step within the workflow, see the failure messages, and access logs for debugging.
質問 # 20
Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?
- A. ENV_ACTOR
- B. GITHUB_WORKFLOW_ACTOR
- C. GITHUB_ACTOR
- D. GITHUB_USER
正解:C
解説:
The GITHUB_ACTOR environment variable indicates the name of the person or app that initiated the workflow. This variable is automatically provided by GitHub in the workflow and can be used to identify the user or application triggering the workflow.
質問 # 21
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. pull_request
- B. check_run
- C. workflow_run
- D. workflow_call
正解:D
解説:
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.
質問 # 22
GitHub-hosted runners support which capabilities? (Choose two.)
- A. support for Linux, Windows, and mac
- B. requiring a payment mechanism (e.g., credit card) to use for private repositories
- C. automatic patching of both the runner and the underlying OS
- D. automatic file-system caching between workflow runs
- E. support for a variety of Linux variations including CentOS, Fedora, and Debian
正解:A、E
解説:
GitHub-hosted runners automatically handle patching, meaning they will be kept up to date with the latest security updates and software patches for both the runner environment and the underlying operating system.
GitHub-hosted runners support Linux, Windows, and macOS, giving you flexibility to run workflows on different operating systems without needing to manage your own self-hosted runners.
質問 # 23
Which of the following scenarios would require the use of self-hosted runners instead of GitHub-hosted runners?
- A. using Docker containers as part of the workflow
- B. exceeding 50,000 monthly minutes of build time
- C. running more than the three concurrent workflows supported by GitHub-hosted runners
- D. using specialized hardware configurations required for workflows
- E. performing builds on macOS
正解:C、D
解説:
GitHub-hosted runners have a limit on the number of concurrent workflows (typically 20 for free-tier accounts and 5 for enterprise). If your organization needs to run more workflows simultaneously, you would need to use self-hosted runners to increase the available concurrency.
Self-hosted runners allow you to configure specialized hardware or software setups that are necessary for certain workflows. GitHub-hosted runners may not have access to custom hardware configurations like GPUs or other specialized resources, so self-hosted runners are required in such cases.
質問 # 24
Which scopes are available to define custom environment variables within a workflow file? (Choose three.)
- A. the contents of a job within a workflow, by using jobs.<job_id>.env
- B. within the run attribute of a job step
- C. the entire stage, by using env at the top of the defined build stage
- D. all jobs being run on a single Actions runner, by using runner.env at the top of the workflow file
- E. a specific step within a job, by using jobs.<job_id>.steps[*].env
- F. the entire workflow, by using env at the top level of the workflow file
正解:B、E、F
解説:
You can define environment variables for the entire workflow by using the env key at the top level of the workflow file. These environment variables will be available to all jobs and steps within the workflow.
Environment variables can also be set within the run attribute of a job step, and these variables will be scoped only to that specific step.
You can set environment variables for specific steps within a job by using jobs.<job_id>.steps[*].env, which allows you to define variables that will only be available to that step.
質問 # 25
You are reaching your organization's storage limit for GitHub artifacts and packages. What should you do to prevent the storage limit from being reached? (Choose two.)
- A. Configure the artifact and log retention period.
- B. Configure the repo to use Git Large File Storage.
- C. Disable branch protections in the repository.
- D. Use self-hosted runners for all workflow runs.
- E. Delete artifacts from the repositories manually
正解:A、E
解説:
Deleting artifacts from repositories manually will free up storage space. Artifacts are typically stored for a limited time by default, but manual cleanup can help manage space.
Configuring the artifact and log retention period allows you to control how long artifacts and logs are retained in your repository. By shortening the retention period, you can prevent unnecessary accumulation of data and manage storage more effectively.
質問 # 26
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. Docker container action
- B. JavaScript action
- C. Python action
- D. composite run step
正解:A
解説:
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.
質問 # 27
As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)
- A. Store shared corporate actions in subfolders in a defined and documented internally accessible repository.
- B. Create a marketplace partition to publish reusable automation for the company.
- C. Create reusable actions and workflows that can be called from other workflows.
- D. Create workflow templates and store them in the organization's .github repository.
正解: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.
質問 # 28
As a developer, how can you identify a Docker container action on GitHub?
- A. The action.yml metadata file references a Dockerfile file.
- B. The action's repository name includes the keyword "Docker."
- C. The action.yml metadata file has the runs.using value set to Docker.
- D. The action's repository includes @actions/core in the root directory.
正解:C
解説:
In a Docker container action, theaction.ymlfile includes theruns.usingfield, which is set todockerto specify that the action runs inside a Docker container. This is the key indicator that the action is a Docker container action.
質問 # 29
Which choices represent best practices for publishing actions so that they can be consumed reliably? (Choose two.)
- A. commit SHA
- B. tag
- C. default branch
- D. repo name
- E. organization name
正解:A、B
解説:
Using a tag is a best practice because tags are immutable and represent a fixed version of your action. By referencing tags, consumers of your action can be assured they are using a stable and specific version of the action, which helps in avoiding issues with breaking changes.
The commit SHA is another reliable way to specify a particular version of an action. By referencing a specific commit SHA, consumers can ensure they are using exactly the code that was written at that moment, avoiding the potential for changes in the future.
質問 # 30
What is the right method to ensure users approve a workflow before the next step proceeds?
- A. grantingusers workflow approval permissions
- B. adding users as required reviewers for an environment
- C. creating a branch protection rule and only allow certain users access
- D. granting users repository 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.
質問 # 31
Which default GitHub environment variable indicates the owner and repository name?
- A. ENV REPOSITORY
- B. REPOSITORY NAME
- C. GITHUB WORKFLOW REPO
- D. GITHUB REPOSITORY
正解:B
解説:
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.
質問 # 32
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 is configured to run on self-hosted runners
- B. A workflow error produces too many, or wrong, requests, impacting external services negatively.
- C. A runner needs to have diagnostic logging enabled.
- D. A workflow sends requests to a service that is down.
- E. A workflow needs to be changed from running on a schedule to a manual trigger
正解: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.
質問 # 33
How many jobs will result from the following matrix configuration?
- A. 4 jobs
- B. 6 jobs
- C. 5 jobs
- D. 3 jobs
正解:B
解説:
The matrix configuration specifies two variables: color and animal. The color variable has 2 values (green and pink), and the animal variable has 2 values (owl and magpie). This would result in 4 combinations (2 color values × 2 animal values). Additionally, the include section introduces two more combinations (color: blue and animal: owl; color: pink and animal: magpie).
質問 # 34
Which workflow event is used to manually trigger a workflow run?
- A. workflow_dispatch
- B. workflow_run
- C. status
- D. create
正解:A
解説:
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.
質問 # 35
As a developer, you are designing a workflow and need to communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks. Which of the following options should you use?
- A. self-hosted runners
- B. enable debug logging
E composite run step - C. workflow commands
- D. environment variables
正解:C
解説:
Workflow commands are special commands that allow you to interact with the runner, set environment variables, output values, add debug messages, and perform other tasks within the workflow. These commands are used to modify the environment or influence the behavior of the GitHub Actions runner.
質問 # 36
You are a developer, and your container jobs are failing on a self-hosted runner. Which requirements must you check to ensure that the self-hosted runner is properly configured? (Choose two.)
- A. Kubernetes is installed on the self-hosted runner.
- B. The service status of Kubernetes is "active".
- C. The self-hosted runner is running a Windows operating system.
- D. The self-hosted runner is running a Linux operating system.
- E. Docker is installed on the self-hosted runner.
正解:D、E
解説:
While Docker can run on various operating systems, Linux is often the most common and preferred OS for containerized workloads. Docker works well on Linux and is a widely-used platform for running containers.
For container jobs to run on a self-hosted runner, Docker must be installed and properly configured on the runner. Docker is required to build and run containerized workloads in a GitHub Actions workflow.
質問 # 37
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. POST /repos/:owner/:repo/actions/runs/:run_id
- B. GET /repos/:owner/:repo/actions/runs/:run_id/logs
- C. GET /repos/:owner/:repo/actions/artifacts/logs
- D. POST /repos/:owner/:repo/actions/runs/:run_id/logs
正解:B
解説:
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.
質問 # 38
......
GitHub GitHub-Actions 認定試験の出題範囲:
| トピック | 出題範囲 |
|---|---|
| トピック 1 |
|
| トピック 2 |
|
| トピック 3 |
|
更新された問題を提供していますGitHub-Actions問題集PDF:https://www.passtest.jp/GitHub/GitHub-Actions-shiken.html
更新された公式問題GitHub-Actions認定にはGitHub-Actions問題集PDF:https://drive.google.com/open?id=1UN6zgRpM9ugvowfxIVuHeLRT7XfyijoJ