Skip to content

Commit

Permalink
Gocsi/Add Makefile Targets for Local PR Checks (#55)
Browse files Browse the repository at this point in the history
Co-authored-by: Don Khan <[email protected]>
  • Loading branch information
mgandharva and donatwork authored Feb 17, 2025
1 parent 886cd0b commit 671aac1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,20 @@ clobber: clean
$(MAKE) -C mock $@

.PHONY: build test bench clean clobber

.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"

0 comments on commit 671aac1

Please sign in to comment.