Act: Run test github actions locally!

I was looking for a faster way to debug github actions, and i found it!

Enter 'Act'

nektos/act: Run your GitHub Actions locally πŸš€

it uses docker underneath to run action locally

Required

install this :

Docker Desktop for Mac and Windows | Docker
Learn why Docker Desktop is the preferred choice for millions of developers building containerized applications. Download for Mac or Windows.

Windows install

Required install chocolatey

Chocolatey Software | Installing Chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Chocolatey (Windows)

choco install act-cli

Linux install

Bash script

Run this command in your terminal:

curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo

How to use it?

cd to github repo with .github/workflows/ folder
run the following


act -l
> ID               Stage  Name
> chrome-headless  0      chrome-headless

act chrome-headless -l

------------
RUN this command bellow
act
it asks if you want to install large, medium or small docker image, i picked small because i use node.js
resutls of `act`

🎊🎊Success! we just ran github actions locally!🎊🎊


Author

by oran collins
github.com/wisehackermonkey
oranbusiness (❁´◑`❁) gmail ^_____^ com
20211112