TODO
Questions
What file extension is used for GitHub Actions workflow files?
.workflow
.yml or .yaml
.github
.actions
Where must the GitHub Actions workflow files be placed in a repository?
In the root directory of the repository
In the .github/workflows/ directory
In the actions/ directory
In the workflow/ directory
Which event can trigger a GitHub Actions workflow?
Push to a repository
A pull request is opened
A GitHub release is created
All of the above
What is a runner in GitHub Actions?
A type of workflow
A user who triggers the workflow
The virtual environment in which the workflow runs
A specific task within a job
How can you reuse workflows in GitHub Actions?
By linking to another workflow file in the repository
Using the uses keyword in your workflow to reference an action
By copying the workflow file to another repository
It is not possible to reuse workflows
What is a job in the context of GitHub Actions?
A step in a workflow
An individual task that runs sequentially in a workflow
A collection of steps that run in parallel
A set of workflows that are executed on a trigger event
How are secrets stored and used in GitHub Actions?
In plain text files within the repository
As environment variables in the virtual environment
In the repository settings as encrypted secrets
They are not supported; all sensitive data must be hard-coded
Answers
Answer: b. .yml or .yaml
Explanation: GitHub Actions workflows are defined in YAML files with .yml or .yaml extensions.
Answer: b. In the .github/workflows/ directory
Explanation: Workflow files must be placed in the .github/workflows/ directory of your repository.
Answer: d. All of the above
Explanation: GitHub Actions workflows can be triggered by a variety of events such as a push, pull request, release, and many more.
Answer: c. The virtual environment in which the workflow runs
Explanation: A runner is a server that has the GitHub Actions runner application installed. It runs one job at a time.
Answer: b. Using the uses keyword in your workflow to reference an action
Explanation: The uses keyword can be used to reuse an action as a step within a job.
Answer: b. An individual task that runs sequentially in a workflow
Explanation: A job is a set of steps in a workflow that executes on the same runner. By default, jobs run in parallel unless specified otherwise.
Answer: c. In the repository settings as encrypted secrets
Explanation: Secrets are stored encrypted and exposed to the workflow run as environment variables.