From 798eea093a244ea73dfa1562eae67f5d3744a6c5 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Fri, 31 Oct 2025 22:00:09 +0100 Subject: [PATCH] feat: add act configuration for local workflow testing - Add .actrc file to map custom runner labels to Docker images - Add test-workflow.sh script for easy local testing with act - Maps php-ci runner to php-ci:latest Docker image - Maps docker-build runner to docker:latest - Helps resolve 'ansible: command not found' errors when testing workflows locally --- .actrc | 6 ++++++ test-workflow.sh | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 .actrc create mode 100755 test-workflow.sh diff --git a/.actrc b/.actrc new file mode 100644 index 00000000..994867be --- /dev/null +++ b/.actrc @@ -0,0 +1,6 @@ +# Act Configuration for local GitHub Actions testing +# Maps runner labels to Docker images +# Format: -P label=image (one per line, or use test-workflow.sh script) + +-P php-ci=php-ci:latest +-P docker-build=docker:latest diff --git a/test-workflow.sh b/test-workflow.sh new file mode 100755 index 00000000..3404be4a --- /dev/null +++ b/test-workflow.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Script to test Gitea workflows locally with act +# Maps custom runner labels to Docker images + +act -P php-ci=php-ci:latest \ + -P docker-build=docker:latest \ + -P ubuntu-latest=ubuntu:latest \ + -P ubuntu-22.04=ubuntu:22.04 \ + "$@"