GitHub Actions v1.0

Page:    1 / 6   
Exam contains 85 questions

As a developer, you need to add the correct syntax to allow the following workflow file to be triggered by multiple types of events. Which two code blocks should you add starting at line 5? (Each correct answer presents a complete solution. Choose two.)

  • A. on: [push, pull_request]
  • B. on:
    branches:
    - 'main'
    - 'dev'
  • C. on:
    schedule:
    - cron: '*/15 * * * *'
    initiate:
    - 'main'
  • D. on: [push, commit]
  • E. on:
    push:
    branches:
    - main
    release:
    types:
    - created
  • F. on:
    env:
    - 'prod'
    - 'qa'
    - 'test'


Answer : AE

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


Answer : B

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? (Each correct answer presents a complete solution. Choose two.)

  • A. Use self-hosted runners for all workflow runs.
  • B. Delete artifacts from the repositories manually.
  • C. Configure the artifact and log retention period.
  • D. Disable branch protections in the repository.
  • E. Configure the repo to use Git Large File Storage.


Answer : BC

While awaiting approval, how many days can a workflow be in the “Waiting” state before it automatically fails?

  • A. 30 days
  • B. 60 days
  • C. 14 days
  • D. 7 days


Answer : A

What is the proper syntax to reference the system-provided run number variable?

  • A. ${{var.GITHUB_RUN_NUMBER}}
  • B. ${{env.GITHUB_RUN_NUMBER}}
  • C. $GITHUB_RUN_NUMBER
  • D. ${{GITHUB_RUN_NUMBER}}
  • E. $github.run_number


Answer : D

How can a workflow deploy mitigate the risk of multiple workflow runs that are deploying to a single cloud environment simultaneously? (Each correct answer presents part of the solution. Choose two.)

  • A. Reference the mutex in the task performing the deployment.
  • B. Set the concurrency in the deploymentjob to 1.
  • C. Specify a target environment in the deploymentjob.
  • D. Specify a concurrency scope in the workflow.
  • E. Configure the mutex setting in the environment.
  • F. Pass the mutex into the deployment job.


Answer : CD

Which default GitHub environment variable indicates the name of the person or app that initiated a workflow?

  • A. GITHUB_ACTOR
  • B. GITHUB USER
  • C. ENV_ACTOR
  • D. GITHUB_WORKFLOW_ACTOR


Answer : A

As a developer, you are configuring GitHub Actions to deploy VMs to production. A member of the VMOps team must provide approval before the deployment occurs. Which of the following steps should you take? (Each correct answer presents part of the solution. Choose two.)

  • A. Navigate to the organization settings and create a Production environment with the VMOps team as a required reviewer.
  • B. Specify the environment named Production in the workflow jobs that deploy to the VMs.
  • C. Navigate to the repository settings and create a Production environment with the VMOps team as a required reviewer.
  • D. Add the VMs to the environment.
  • E. Specify the VMOps team as the owner of the environment.


Answer : BC

Which of the following is the lowest repository permission you need to have for downloading workflow artifacts?

  • A. Triage
  • B. Admin
  • C. Maintain
  • D. Write
  • E. Read


Answer : E

Which statement is true regarding the ability to delete a workflow run?

  • A. Admin access is required to delete a workflow run.
  • B. Pending workflow runs may be deleted.
  • C. Completed workflow runs may be deleted.
  • D. Workflow runs must be older than 30 days to be deleted.


Answer : C

As a developer, how should you enable step debug logging for a workflow?

  • A. Include the following code block in your workflow:
    env:
    ACTIONS_STEP_DEBUG: true
  • B. Use the --actions-step-debug flag when calling the workflow.
  • C. Include the following code block in your workflow:
    defaults:
    ACTIONS_STEP_DEBUG: true
  • D. Set the ACTIONS_STEP_DEBUG secret or variable at the repository level to true.


Answer : D

Which command can you include in your workflow file to set the output parameter for an action?

  • A. echo "action_color=purple" >> $GITHUB_ENV
  • B. echo "::debug::action_color=purple"
  • C. echo "::add-mask::$ACTI0N_C0L0R"
  • D. echo "action_color=purple" >> $GITHUB_OUTPUT


Answer : D

As a DevOps engineer, you need to execute a deployment to different environments like development and testing based on the labels added to a pull request. The deployment should use the releases branch and trigger only when there is a change in the files under ‘apps’ folder. Which code block should be used to define the deployment workflow trigger?

  • A. on:
    pull_request_label:
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • B. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases/**'
    paths:
    - 'apps'
  • C. on:
    pull_request:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'
  • D. on:
    pull_request_review:
    types: [labeled]
    branches:
    - 'releases'
    paths:
    - 'apps/**'


Answer : C

As a DevOps engineer, you are developing workflows to build an application. You have a requirement to create the build targeting multiple node versions. Which code block should you use to define the workflow?

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


Answer : A

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? (Each correct answer presents a complete solution. Choose two.)

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


Answer : BD

Page:    1 / 6   
Exam contains 85 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy