Github Actions Flashcards

1
Q

What are Github actions?

A

They are workflows that can run CI/CD operations

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

How are Github actions created?

A

Create .yml files in the .github/workflows directory in the root of your project.

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

Explain Github action files

A

The ‘on’ section sets when the action should run. On pull request (github checks) or on “push” (deployments).

Each job is an action, and has a list of ‘steps’ to perform.

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

How do I create a file used as a Github check? How do I allow merges only when check is successful?

A

Create an actions file and add this section:

on:
pull_request:
branches: [names]

Then add a job that is the ‘check’ code, for example to run tests.

This job must contain ‘steps’ to perform.

Use the job name as the check when setting that checks must pass from the Github interface.

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