Skip to content

Commit

Permalink
feat: added act for local pr check
Browse files Browse the repository at this point in the history
  • Loading branch information
mgandharva committed Jan 29, 2025
1 parent 9f73362 commit f8aace8
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,19 @@ integration-test:
check:
@scripts/check.sh ./provider/ ./service/

.PHONY: actions
actions: ## Run all the github action checks that run on a pull_request creation
act -l | grep -v ^Stage | grep pull_request | grep -v image_security_scan | awk '{print $$2}' | while read WF; do act pull_request --no-cache-server --platform ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest --job "$${WF}"; done
.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

.PHONY: action-help
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 ""
@echo "Where '<jobid>' is a Job ID returned by the command:"
@echo "act -l"
@echo
@echo "NOTE: if act if not installed, it can be from https://github.com/nektos/act"

@echo ""
@echo "NOTE: if act is not installed, it can be downloaded from https://github.com/nektos/act"

0 comments on commit f8aace8

Please sign in to comment.