-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4149c88
commit a47c34f
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <jobid>" | ||
@echo "" | ||
@echo "Where '<jobid>' 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" |