Introduction

GitHub’s actions are an awesome way to have CI on GitHub. It runs on VM, can run Container and even release things for you. First, you need to specify the events that trigger the action.

name: install dotfiles
on:
  push:
    paths:
      - .github/workflows/install.yaml
      - install.sh
      - scripts/env.sh
      - start.sh

Then you need to use pre-defined actions to install the required tools:

Note

To reduce the build time, use caching mechanisms. Usually official setup tools supports caching based on the dependency management tools (e.g. go.sum, packages-lock.json, etc.)

- uses: actions/setup-python@v5
  with:
    python-version: "3.13"
    cache: "pipenv"
 
- uses: actions/setup-python@v5
  with:
    python-version: "3.13"
    cache: "poetry"
 
- uses: actions/setup-go@v5
  with:
    go-version-file: "go.mod"
 
- uses: actions/setup-node@v4
  with:
    node-version: 21
    cache: "npm"
    cache-dependency-path: "package-lock.json"

For some programming languages, there is no official action:

For building docker images and pushing them you can use:

For releasing Helm charts (using HTTP Helm repositories not OCI one):

For doing release:

References