GH-200 · Question #79
GH-200 Question #79: Real Exam Question with Answer & Explanation
The correct answer is A: Push the image to the GitHub Container Registry.. Publishing Docker images The below workflow checks out the GitHub repository, uses the login-action to log in to the registry [B], and then uses the build-push-action action to: build a Docker image based on your repository's Dockerfile [E]; push the image to Docker Hub [A], and
Question
As a developer, which workflow steps should you perform to publish an image to the GitHub Container Registry? (Each correct answer represents part of the solution. Choose three).
Options
- APush the image to the GitHub Container Registry.
- BAuthenticate to the GitHub Container Registry.
- CUse the actions/setup-docker action.
- DPull the image from the GitHub Container Registry.
- EBuild the container image.
Explanation
Publishing Docker images The below workflow checks out the GitHub repository, uses the login-action to log in to the registry [B], and then uses the build-push-action action to: build a Docker image based on your repository's Dockerfile [E]; push the image to Docker Hub [A], and apply a tag to the image. # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # GitHub recommends pinning actions to a commit SHA. # To get a newer version, you will need to update the SHA. # You can also reference a tag or branch, but the action may change without warning. https://docs.github.com/en/actions/tutorials/publish-packages/publish-docker-images
Topics
Community Discussion
No community discussion yet for this question.