nerdexam
Microsoft

GH-200 · Question #59

Which of the following is a valid reusable workflow reference?

The correct answer is B. uses: octo-org/another-repo/.github/workflows/workflow.yml@v1. Calling a reusable workflow You call a reusable workflow by using the uses keyword. Unlike when you are using actions within a workflow, you call reusable workflows directly within a job, and not from within job steps. jobs.<job_id>.uses You reference reusable workflow files usin

Consume Workflows

Question

Which of the following is a valid reusable workflow reference?

Options

  • Auses: octo-org/another-repo/workflow.yml@v1
  • Buses: octo-org/another-repo/.github/workflows/workflow.yml@v1
  • Cuses: another-repo/.github/workflows/workflow.yml@v1
  • Duses: another-repo/workflow.yml@v1

How the community answered

(24 responses)
  • B
    96% (23)
  • C
    4% (1)

Explanation

Calling a reusable workflow You call a reusable workflow by using the uses keyword. Unlike when you are using actions within a workflow, you call reusable workflows directly within a job, and not from within job steps. jobs.<job_id>.uses You reference reusable workflow files using one of the following syntaxes: *-> {owner}/{repo}/.github/workflows/{filename}@{ref} for reusable workflows in public and private * ./.github/workflows/{filename} for reusable workflows in the same repository. https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows

Topics

#Reusable workflows#Workflow syntax#GitHub Actions#Workflow reference

Community Discussion

No community discussion yet for this question.

Full GH-200 Practice