From 8335b589dc1af58174d43485ddc7a775172c308b Mon Sep 17 00:00:00 2001 From: mgandharva Date: Thu, 30 Jan 2025 07:26:56 -0500 Subject: [PATCH] feat: added act for local pr check --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..15bf17a9fc --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +.PHONY: actions action-help +actions: ## Run all GitHub Action checks that run on a pull request creation + @echo "Running all GitHub Action checks for pull request events..." + @act -l | grep -v ^Stage | grep pull_request | grep -v image_security_scan | awk '{print $$2}' | while read WF; do \ + echo "Running workflow: $${WF}"; \ + act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job "$${WF}"; \ + done + +action-help: ## Echo instructions to run one specific workflow locally + @echo "GitHub Workflows can be run locally with the following command:" + @echo "act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job " + @echo "" + @echo "Where '' is a Job ID returned by the command:" + @echo "act -l" + @echo "" + @echo "NOTE: if act is not installed, it can be downloaded from https://github.com/nektos/act" \ No newline at end of file