Skip to content

GitHub Actions

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:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pipenv"
- 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