#!/bin/bash # Test GitHub Actions workflow locally using act echo "๐Ÿงช Testing GitHub Actions workflow locally..." echo "" # Check if act is installed if ! command -v act &> /dev/null; then echo "โŒ act is not installed. Install with: brew install act" exit 1 fi # Change to slipmatz-web directory cd "$(dirname "$0")" || exit 1 echo "๐Ÿ“‹ Available workflows:" act --list echo "" echo "๐Ÿ” Dry-run (no execution):" echo " act pull_request --container-architecture linux/amd64 --dryrun" echo "" echo "๐Ÿ—๏ธ Build only (doesn't push to registry):" echo " act pull_request --container-architecture linux/amd64 -j build-and-push" echo "" echo "๐Ÿš€ Test push event (simulates main branch push):" echo " act push --container-architecture linux/amd64 -j build-and-push" echo "" # Ask user what to do read -p "Run dry-run test? (y/n) " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then act pull_request --container-architecture linux/amd64 --dryrun fi