Github Actions Flashcards
What are custom action in Github pipeline
You can create actions by writing custom code that interacts with your repository in any way you’d like, including integrating with GitHub’s APIs and any publicly available third-party API. For example, an action can publish npm modules, send SMS alerts when urgent issues are created, or deploy production-ready code.
Types of actions
- Docker container
- JavaScript
- Composite Actions
Actions require a metadata file to define the inputs, outputs and main entrypoint for your action. The metadata filename must be eitheraction.yml
oraction.yaml
.
we recommend storing actions in the.github
directory. For example,.github/actions/action-a
and.github/actions/action-b
.
https://www.notion.so/Github-Actions-4b1fc236bd7b42098f904b5f18c0163f#fa1bbd382914400c9669626b9ed91310
How to you create environment in Github
Environments are used to describe a general deployment target likeproduction
,staging
, ordevelopment
. When a GitHub Actions workflow deploys to an environment, the environment is displayed on the main page of the repository.
Create new environment, settings, side-bar environment, new environment
What are workflow in Github
Workflows are the files you write that describe the jobs and steps (actions) you want to take. These files are written in .yml or .yaml format; which if you’ve never used before today is just a simple human-readable, data-serialization language.
What is concurrency in Github workflow
Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. You can use concurrency so that an environment has a maximum of one deployment in progress and one deployment pending at a time.
```yaml
name: Deployment
concurrency: production
on:
push:
branches:
- main
jobs: deployment: runs-on: ubuntu-latest environment: production steps: - name: deploy # ...deployment-specific steps
~~~