Github Actions Flashcards
What are Github actions?
They are workflows that can run CI/CD operations
How are Github actions created?
Create .yml files in the .github/workflows directory in the root of your project.
Explain Github action files
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 do I create a file used as a Github check? How do I allow merges only when check is successful?
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.