feat: add GitHub Actions workflow for building and pushing Docker images

This commit is contained in:
Frank John Begornia
2025-11-26 23:43:38 +08:00
parent 3c9ee2940f
commit 562e66d3ce
3 changed files with 231 additions and 0 deletions

37
test-workflow.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/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