Which statement is true about using default environment variables?
Answer(s): 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.
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?
Answer(s): 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.
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?
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.)
Answer(s): A,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.
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
Our website is free, but we have to fight against bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the GitHub-Actions content, but please register or login to continue.