一番最新のGitHub GitHub-Actions試験問題集PDFには2025年更新 [Q26-Q47]

Share

一番最新のGitHub GitHub-Actions試験問題集PDFには2025年更新

100%無料GitHub Certification GitHub-Actions問題集PDFお試しサンプル認定ガイドがカバーされます


GitHub GitHub-Actions 認定試験の出題範囲:

トピック出題範囲
トピック 1
  • GitHub Actions を使用して開発タスクを自動化する: この試験のセクションでは、DevOps エンジニアのスキルを測定し、GitHub Actions の基礎をカバーします。アクション タイプの理解、自動化ワークフローの計画、コンテナー アクションの作成に重点を置いています。測定されるスキルの 1 つは、リポジトリ イベントによってトリガーされるワークフローの作成です。
トピック 2
  • エンタープライズでの GitHub Actions の管理: 試験のこのセクションでは、GitHub マネージャーのスキルを測定し、エンタープライズ レベルでの GitHub Actions の管理について説明します。アクションとワークフローの管理、ランナーの構成、暗号化されたシークレットの使用のためのツールに重点を置いています。測定されるスキルの 1 つは、エンタープライズ ユースケース向けにセルフホスト ランナーをカスタマイズすることです。
トピック 3
  • GitHub Actions を使用してアプリケーションを構築し、Azure にデプロイする: 試験のこのセクションでは、GitHub Actions を使用してアプリケーションを Azure にデプロイする方法について説明します。継続的デリバリー ワークフロー、環境保護、Azure リソース管理に重点を置いています。

 

質問 # 26
As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (Choose two.)

  • A. Use artifacts when referencingfiles produced by a job after a workflow has ended.
  • B. Use caching to store cache entries for up to 30 days between accesses.
  • C. Use cachingwhen reusing files that change rarely between jobs or workflow runs.
  • D. Use artifacts to access theGitHub Package Registry and download a package for a workflow

正解:A、C


質問 # 27
What is the right method to ensure users approve a workflow before the next step proceeds?

  • A. creating a branch protection rule and only allow certain users access
  • B. adding users as required reviewers for an environment
  • C. granting users repository approval permissions
  • 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.


質問 # 28
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 workflow error produces too many, or wrong, requests, impacting external services negatively.
  • D. A runner needs to have diagnostic logging enabled.
  • E. A workflow is configured to run on self-hosted runners

正解:B、C

解説:
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.


質問 # 29
Which default GitHub environment variable indicates the owner and repository name?

  • A. GITHUB WORKFLOW REPO
  • B. GITHUB REPOSITORY
  • 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.


質問 # 30
As a developer, what options should you recommend to implement standards for automation reuse? (Choose two.)

  • A. Create workflow templates and store them in the organization's .github repository.
  • B. Create a marketplace partition to publish reusable automation for the company.
  • C. Store shared corporate actions in subfolders in a defined and documented internally accessible repository.
  • D. Create reusable actions and workflows that can be called from other workflows.

正解:A、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.


質問 # 31
As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which input parameters are required for this action? (Choose two.)

  • A. dependency: the name and version of a package to cache or restore
  • B. restore-keys: the copy action key used with cache parameter to cache the data
  • C. key: the key created when saving a cache and the key used to search for a cache
  • D. path: the file path on the runner to cache or restore
  • E. cache-hit: the copy action key used with restore parameter to restore the data from the cache
  • F. ref: the ref name of the branch to access and restore a cache created

正解:C、D

解説:
The key is required because it uniquely identifies the cache. It is used to store and retrieve cached data. When creating or restoring a cache, you need to define a key that will be used to identify the cache.
The path is the file path on the runner that you want to cache. This is where the cached files or dependencies are located and should be specified to tell GitHub where to store or retrieve the cache from.


質問 # 32
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/runs/:run_id/logs
  • B. POST /repos/:owner/:repo/actions/runs/:run_id
  • C. GET /repos/:owner/:repo/actions/artifacts/logs
  • D. POST /repos/:owner/:repo/actions/runs/:run_id/logs

正解:A

解説:
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.


質問 # 33
What is the minimal syntax for declaring an output named foo for an action?

  • A.
  • B.
  • C.
  • D.

正解:C

解説:
The correct minimal syntax for declaring an output in GitHub Actions is by using thefookey underoutputs, and associating it with avalue(in this case,Some value). This is the simplest form to define an output in a workflow or action.


質問 # 34
What can be used to set a failed status of an action from its code?

  • A. composite run step
  • B. JavaScript dist/ folder
  • C. a non-zero exit code
  • D. @actions/github toolkit
  • E. Dockerfile CMD
  • F. output variable

正解: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.


質問 # 35
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?

  • A. Add the pull_request webhook event as a trigger for the workflow when the code quality integration is synchronized
  • B. Add the workflow_run webhook event as a trigger for the workflow for the code quality integration name
  • C. Add the check_run webhook event as a trigger for the workflow when the code quality integration is completed
  • D. Add the deployment webhook event as a trigger for the workflow when the code quality integration is completed

正解:C

解説:
Thecheck_runevent is triggered when a check (such as a code quality check) completes, including when the status of a check changes. By adding this event as a trigger, you can initiate a follow-up workflow when the code quality integration finishes its checks.


質問 # 36
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?

  • A. via a repository owned by a third party
  • B. via repositories owned by the organization
  • C. via the GitHub Marketplace
  • D. via the .github repository owned by the organization

正解:B

解説:
To prevent reaching the storage limit for GitHub artifacts and packages, you should manage and clean up artifacts and packages stored in repositories owned by your organization. This includes deleting unnecessary artifacts and managing the lifecycle of packages, as they contribute directly to your organization's storage quota.


質問 # 37
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?
As a DevOps engineer developing a JavaScript action, you need to include annotations to pass warning messages to workflow runners. Which code snippet can you use to implement an annotation in your Actions?

  • A. core.info('Something went wrong, but it\'s not bad enough to fail the build.')
  • B. core.notice('Something went wrong, but it\'s not bad enough to fail the build.')
  • C. core.warning('Something went wrong, but it\'s not bad enough to fail the build.')
  • D. core.warn('Something went wrong, but it\'s not bad enough to fail the build.')

正解:C

解説:
Thecore.warning()function from the@actions/corepackage is used to create a warning message in the workflow logs. This is an annotation type that informs users about issues that don't require failing the build but still need attention.


質問 # 38
Based on the YAML below, which two statements are correct? (Choose two.)

  • A. This workflow file is using a matrix strategy.
  • B. This workflow will publish a package to GitHub Packages.
  • C. The workflow job publish-npm will only run after the build job passes.
  • D. This workflow will publish a package to an npm registry.

正解:C、D

解説:
The publish-npm job includes the JS-DevTools/npm-publish action, which is used to publish an npm package to an npm registry.
The publish-npm job has the needs: build directive, meaning it will only run after the build job successfully completes.


質問 # 39
You have exactly one Windows x64 self-hosted runner, and it is configured with custom tools. Which syntax could you use in the workflow to target that runner?

  • A. runs-on: windows-latest
  • B. runs-on: [self-hosted, windows, x64]
  • C. self-hosted: [windows-x64]
  • D. self-hosted: [windows, x64]

正解:B

解説:
The runs-on keyword allows you to specify the operating system and other labels for the runner. By specifying self-hosted, windows, and x64, you are targeting a self-hosted Windows runner that matches these criteria, which aligns with the custom configuration of your self-hosted runner.


質問 # 40
Which of the following statements are true regarding the use of GitHub Actions on a GitHub Enterprise Server instance? (Choose three.)

  • A. Use of GitHub Actions on GitHub Enterprise Server requires a persistent internet connection
  • B. Most GitHub authored actions are automatically bundled for use on GitHub Enterprise Server
  • C. Third party actions can be manually synchronized for use on GitHub Enterprise Server
  • D. Actions must be defined in the .github repository
  • E. Actions created by GitHub are automatically available and cannot be disabled
  • F. Third party actions can be used on GitHub Enterprise Server by configuring GitHub Connect

正解:A、C、F

解説:
GitHub Actions on GitHub Enterprise Server often requires an internet connection, especially for accessing actions from the GitHub Marketplace or third-party actions unless they are manually synced to the server.
To use third-party actions on GitHub Enterprise Server, GitHub Connect can be used to establish a connection between the server and GitHub.com, enabling access to third-party actions.
Third-party actions can also be manually synchronized to the GitHub Enterprise Server, making them available for use in workflows.


質問 # 41
What are the two ways to pass data between jobs? (Choose two.)

  • A. Use the copy action to save the data that should be passed in the artifacts folder.
  • B. Use the copy action with restore parameter to restore the data from the cache
  • C. Use job outputs
  • D. Use artifact storage.
  • E. Use data storage.
  • F. Use the copy action with cache parameter to cache the data

正解:C、D

解説:
Job outputs are used to pass data from one job to another in a workflow. A job can produce output values (like variables or files), which can be referenced by subsequent jobs using theneedskeyword and${{ steps.step_id.
outputs.output_name }}syntax.
Artifact storage allows data (such as files or results) to be saved by a job and then retrieved by another job in a later step. This is commonly used for passing large amounts of data or files between jobs.


質問 # 42
Which of the following is the best way for an enterprise to prevent certain marketplace actions from running?

  • A. It is not possible; if an action is in the marketplace, its use cannot be restricted.
  • B. Create a list of the actions that are allowed to run as an enterprise policy. Only these actions can be run.
  • C. Create a list that is maintained as a . yml file in a . github repository specified in the enterprise. Only these actions can be run.
  • D. Create a list of the actions that are restricted from being used as an enterprise policy. Every other action can be run.

正解:B

解説:
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.


質問 # 43
Which statement is true about using default environment variables?

  • A. The environment variables can be set in the defaults: sections of the workflow
  • B. The environment variables can be read in workflows using the ENV: variable_name syntax.
  • C. The environment variables created should be prefixed with GITHUB_ to ensure they can be accessed in workflows
  • D. The GITHUB_WORKSPACE environment variable should be used to access files from within the runner.

正解:D

解説:
GITHUB_WORKSPACE is a default environment variable in GitHub Actions that points to the directory on the runner where your repository is checked out. This variable allows you to access files within your repository during the workflow.


質問 # 44
How should you install the bats NPM package in your workflow?

  • A.
  • B.
  • C.
  • D.

正解:B

解説:
The correct syntax includes specifying the job (example-job), the runner (ubuntu-latest), and the necessary step (npm install -g bats) within the workflow. This ensures that the package is installed properly during the execution of the job.


質問 # 45
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.


質問 # 46
Which of the following commands will set the $FOO environment variable within a script, so that it may be used in subsequent workflow job steps?

  • A. run: echo ${{ $FOO=bar }}
  • B. run: echo "FOO=bar" >> $GITHUB_ENV
  • C. run: echo "::set-env name=FOO::bar"
  • D. run: export FOO=bar

正解:B

解説:
The $GITHUB_ENV environment variable is used to set environment variables that persist across steps in a workflow job. By echoing FOO=bar into $GITHUB_ENV, the variable FOO will be available in subsequent steps within the same job.


質問 # 47
......

更新されたのはGitHub GitHub-Actions問題集PDFオンラインエンジン:https://www.passtest.jp/GitHub/GitHub-Actions-shiken.html

PDF試験材料は2025年最新の実際に出るGitHub-Actions問題集:https://drive.google.com/open?id=11_tx5dPpS38-Ff9JSJjlvw6l9j59Ekn_