nerdexam
Microsoft

GH-200 · Question #79

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).

The correct answer is A. Push the image to the GitHub Container Registry. B. Authenticate to the GitHub Container Registry. E. Build the container image.. 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

Implement and manage GitHub Actions workflows

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.

How the community answered

(31 responses)
  • A
    84% (26)
  • C
    6% (2)
  • D
    10% (3)

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

#GitHub Container Registry#Container Images#Publishing Images#GitHub Actions

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice