Skip to content
angelphanthPublic

About

Quick start to act for running github actions locally

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

act demo

A ~15min intro to act for linux or macos

Table of Contents


e.g. via homebrew

brew install act

Recommended: Install GitHub Local Actions

GitHub Local Actions is an extension for act on VS code and it is awesome. This is an optional but highly recommended step.


Requirements

A running container!

Below is a quick example of installing and starting a docker engine with colima (see colima-demo for more info ☺️)

Install colima

brew install colima

Install docker

brew install docker

Start up docker

colima start

Tip

For act+colima, you may need to set up $DOCKER_HOST via your shell profile (e.g., in ~/.zshrc add export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock") or set up a symlink e.g. sudo ln -s ~/.colima/default/docker.sock /var/run/docker.sock Check out the colima FAQ


Demo

The fine-memes project

It is a dummy package for our demo that retrieves and displays random meme images from imgflip.com.

Installation

#pip install fine-memes
# For development
uv sync --all-groups

Usage

# import
from fine_memes import random_meme

# open rando meme 
random_meme(
    notebook=False, #default, set to True if wanting to render in jupyter notebook
)

see tryitout.ipynb

Add changes

e.g.

Getting started with act

Now let's see some CI/CD in action

  1. Run a job
act -j test
  1. Trigger an event
act pull_request
  1. Now try running jobs from the GitHub Local Actions

Then if happy with act results then actually trigger the GitHub Actions e.g. make a pull_request


Links

Thank you

Thank you to the above resources, imgflip.com, and for your attention :)

About

Quick start to act for running github actions locally

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages