GITHUB-FOUNDATIONS practice question 11 of 15

Workflows can reference actions in: (Each correct answer presents a complete solution. Choose three.)

Full set: 75 questions
Answer options
A: Any public repository. Correct answer
B: The same repository as your workflow file. Correct answer
C: GitHub Packages.
D: An enterprise marketplace.
E: A published Docker container image on Docker Hub. Correct answer
Correct Answer:
A. Any public repository.; B. The same repository as your workflow file.; E. A published Docker container image on Docker Hub.
Explanation

A workflow step that uses the uses: keyword can pull an action from only three officially-supported locations:
1) the same repository that contains the workflow file;
2) any public repository on GitHub;
3) a public Docker image hosted on Docker Hub (referenced with the docker:// prefix). These are the only locations documented by GitHub for the Foundations feature set, so options A, B and E are correct.

Why Incorrect

C. GitHub Packages (ghcr.io) images cannot be referenced with uses: for actions in Foundations; only Docker Hub images are supported in the official documentation.
D. “Enterprise marketplace” is not a hosting location for action code; Marketplace only lists actions whose source is in a GitHub repository, already covered by option A.

References

1. GitHub Documentation – “Using actions in your workflow”, Section “Including an action in a workflow” (docs.github.com/en/actions/using-workflows/using-actions-in-your-workflow#including-an-action-in-a-workflow).

2. GitHub Documentation – same page, bullets: “Use an action in the same repository”, “Use a public action in a public repository”, “Use a published Docker container image from Docker Hub” (para. 3-5).

Scroll to Top