exam questions

Exam AZ-400 All Questions

View all questions & answers for the AZ-400 exam

Exam AZ-400 topic 9 question 18 discussion

Actual exam question from Microsoft's AZ-400
Question #: 18
Topic #: 9
[All AZ-400 Questions]

HOTSPOT
-

You have a GitHub repository.

You plan to use the repository to create a container.

You need to configure GitHub Actions to deploy the container to GitHub Container Registry.

How should you complete the script? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mfawew223
Highly Voted 1 year, 5 months ago
I believe the answer is correct. The link below mentions the login method having that "echo GITHUB_TOKEN" language. GITHUB_TOKEN is a installation access token, kind of like a PAT. It even recommends to use GITHUB_TOKEN in lieu of a PAT for GitHub Actions. The following section talks about pushing the container, using syntax similar to the 3rd given answer. The article is about pushing containers, so its assuming the container is built already. But of the remaining options, 2 are other login methods and 1 is a pull, which we dont need to do when deploying. So build must be the other option used, and it goes before the push. Usually it goes docker login, docker build, docker push. https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
upvoted 7 times
...
ServerBrain
Most Recent 1 year, 4 months ago
I think it's correct; login, build then push
upvoted 1 times
Nian
1 year, 3 months ago
Would it not be possible to build before login? The login is required for operations on the registry (the push) only
upvoted 5 times
p2006
6 months, 2 weeks ago
I can build without login. docker build login with $github_token docker push
upvoted 4 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago