GitHub Actions 1 Flashcards

1
Q

What is GitHub Actions?

A

A CI/CD and automation platform that allows you to build, test, and deploy code directly from GitHub.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a workflow in GitHub Actions?

A

A configuration file that defines automated processes in your repository, located in .github/workflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a job in GitHub Actions?

A

A set of steps that are executed as part of a workflow. Each job runs in its own virtual environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are steps in GitHub Actions?

A

Individual tasks within a job, such as running a script or installing dependencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does runs-on specify in a job configuration?

A

The virtual environment or runner where the job will execute (e.g., ubuntu-latest, windows-latest).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an action in GitHub Actions?

A

A reusable unit of code that performs a specific task, such as checking out code or setting up a programming environment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the purpose of the on field in a workflow?

A

Specifies the events that trigger the workflow, such as push, pull_request, or schedule.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the difference between a custom action and a marketplace action?

A

Custom actions are created by you, while marketplace actions are pre-built by others and available for reuse.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a runner in GitHub Actions?

A

A server that runs workflows; GitHub provides hosted runners or you can set up self-hosted runners.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a matrix build in GitHub Actions?

A

A feature that allows testing across multiple configurations, like different versions of a language or operating system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a secret in GitHub Actions?

A

Sensitive data (e.g., API keys, tokens) stored securely in a repository and accessed in workflows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the GitHub Actions Marketplace?

A

A catalog of pre-built actions and workflows created by the community and GitHub.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does uses do in a step?

A

Specifies an action from the marketplace or a repository to be used in the step.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is caching in GitHub Actions?

A

Storing dependencies or build artifacts to speed up workflows using actions like actions/cache.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the jobs.<job_id>.needs field used for?</job_id>

A

To define job dependencies, ensuring that a job runs only after its dependencies have completed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is GITHUB_TOKEN in GitHub Actions?

A

An automatically generated token for authenticating actions in a workflow.

17
Q

How do you run a workflow on a schedule?

A

Use the schedule trigger with a cron syntax, e.g.,:

18
Q

What is a repository_dispatch trigger?

A

A custom event trigger that allows external services to trigger workflows via the GitHub API.

19
Q

What happens if a workflow fails?

A

GitHub provides logs and highlights the failing steps in the Actions tab for debugging

20
Q

What are reusable workflows?

A

Workflows that can be called from other workflows to reduce duplication and improve maintainability.