Git Actions

It is a workflow automator. It uses the main generated Github events to execute many different tasks, including CI/CD pipelines.

Main CI processes

  • Execute tests;

  • Linter the code;

  • Check code quality, reduce Code Smells, etc;

  • Security checks (like forgotten passwords or tokens on the code);

  • Generate artifacts for deploy (like zip files with executable, or docker images);

  • Identify the next Version to be generated (like );

  • Generate tags and releases. (like analyze to auto generate Tags and Releases, based on the Commits history)

Git Actions Components

A repository can have multiple workflows, that triggers based on events on the repository, or manually triggered, or at a defined schedulearrow-up-right, or by posting to a Rest APIarrow-up-right.

Workflows contain one or more jobs that can run in sequencial order or in parallel.

Each Job will run inside its own virtual machine Runner or container and can have one or more Steps.

Each Step runs either a script or an action (reusable extensions).

Drawing

Workflows

A workflow is a .yaml file that is created in the project's /.github/workflows folder.

You can reference a workflow within another workflow.

Inside workflows you can:

triangle-exclamation
circle-check

Example

Events

Events are specific activities in a repository that triggers a workflow run.

Check a complete list of eventsarrow-up-right.

Jobs

Are a set of steps that are executed on the same runner and can share data from one step to another.

Steps are executed in order and are dependent on each other.

circle-exclamation

Runner

Each job execute in a separate Runner.

There are Linux, Windows and MacOS runners to run jobs.

Actions

Are custom application for GitHub Actions plataform that perfoms a complex but repeated task.

circle-info

They are like Docker images, reusable base tasks that were done and shared by other.

Check action in GitHub Marketplacearrow-up-right.

You can also write your own actions.

Last updated