Github Actions Flashcards

1
Q

What are custom action in Github pipeline

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to you create environment in Github

A

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

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

What are workflow in Github

A

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.

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

What is concurrency in Github workflow

A

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

~~~

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