Files
tablejerseys-web/test-workflow.sh
Frank John Begornia 3ba0b250ed
Some checks failed
Deploy Production / deploy (push) Has been cancelled
first commit
2026-01-12 22:16:36 +08:00

38 lines
973 B
Bash
Executable File

#!/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