Skip to content

Commit 1f0eaa3

Browse files
authored
Gofsutil/Add Makefile Targets for Local PR Checks (dell#62)
1 parent fc125d7 commit 1f0eaa3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: actions action-help
2+
actions: ## Run all GitHub Action checks that run on a pull request creation
3+
@echo "Running all GitHub Action checks for pull request events..."
4+
@act -l | grep -v ^Stage | grep pull_request | grep -v image_security_scan | awk '{print $$2}' | while read WF; do \
5+
echo "Running workflow: $${WF}"; \
6+
act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job "$${WF}"; \
7+
done
8+
9+
action-help: ## Echo instructions to run one specific workflow locally
10+
@echo "GitHub Workflows can be run locally with the following command:"
11+
@echo "act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job <jobid>"
12+
@echo ""
13+
@echo "Where '<jobid>' is a Job ID returned by the command:"
14+
@echo "act -l"
15+
@echo ""
16+
@echo "NOTE: if act is not installed, it can be downloaded from https://github.com/nektos/act"

0 commit comments

Comments
 (0)