Free GitHub-Actions Exam Braindumps (page: 2)

Page 2 of 19

Which statement is true about using default environment variables?

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

Answer(s): D

Explanation:

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.



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?

  1. run: echo "::set-env name=FOO::bar"
  2. run: echo "FOO=bar" >> $GITHUB_ENV
  3. run: echo ${{ $FOO=bar }}
  4. run: export FOO=bar

Answer(s): B

Explanation:

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.



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?

  1. via the .github repository owned by the organization
  2. via repositories owned by the organization
  3. via the GitHub Marketplace
  4. via a repository owned by a third party

Answer(s): B

Explanation:

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.



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

  1. This workflow will publish a package to an npm registry.
  2. This workflow will publish a package to GitHub Packages.
  3. This workflow file is using a matrix strategy.
  4. The workflow job publish-npm will only run after the build job passes.

Answer(s): A,D

Explanation:

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.



Page 2 of 19



Post your Comments and Discuss GitHub GitHub-Actions exam with other Community members:

Ian Hoskings commented on January 23, 2025
Hi I purchased the CKA exam and should have got the Github Actions exams as well. The Github exam is not downloading, can you advise please
UNITED KINGDOM
upvote