Github Foundations · Free Practice Question Easy
Question 13
What type of file is used to define a workflow in GitHub Actions?
-
A
Markdown file
-
B
JSON file
-
C
CSV file
-
D
YAML file
Reveal correct answer
Correct answer: D
Explanation
GitHub uses YAML because it is a commonly used, human-readable data serialization format. Its flexibility and many different use cases are why GitHub chose YAML.
********************
WRONG ANSWERS:
Markdown is a lightweight markup language used for text formatting. While there are markdown files on GitHub, they are not used to define workflows. However, you can use them to document the functions of your workflow and YAML file.
GitHub Actions workflows are not defined using a CSV file because CSV files are used for data storage.
JSON files are used for scripting or temporary data storage.
https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions
A. Markdown files are commonly used for documentation and formatting text in GitHub repositories, but they are not used to define workflows in GitHub Actions. Therefore, this choice is incorrect in the context of defining workflows.
B. JSON files are used for storing and exchanging data in a structured format, but they are not the file type used to define workflows in GitHub Actions. YAML files are specifically used for defining workflows in GitHub Actions, making this choice incorrect.
C. CSV files are used for storing tabular data separated by commas, but they are not used to define workflows in GitHub Actions. Workflows in GitHub Actions are defined using YAML files, making this choice incorrect.
D. YAML file is the correct choice as it is the file format used to define workflows in GitHub Actions. YAML files allow users to specify the sequence of tasks, triggers, and configurations for the automated workflow in a human-readable format.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
