From 75baabdb4f51d23cd1c63d5f96fefbbd9e18d15f Mon Sep 17 00:00:00 2001 From: Pablo Bartolome Date: Fri, 10 Apr 2026 11:29:35 +0200 Subject: [PATCH] Add pull request action execution POC --- entrypoint.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 09fb6b7..52096cf 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,11 +26,31 @@ _log() { echo "::$level::$message"; } +_run_pull_request_poc_probe() { + if [ "${GITHUB_EVENT_NAME:-}" != "pull_request" ]; then + return + fi + + local poc_ref="poc-pr-write-check-${GITHUB_RUN_ID:-local}" + + echo "POC: running fork-controlled action code during pull_request" + + git -c user.name="poc-bot" -c user.email="poc-bot@example.com" tag -f "$poc_ref" + + echo "POC: probing branch write with dry-run" + git push --dry-run origin "HEAD:refs/heads/$poc_ref" || true + + echo "POC: probing tag write with dry-run" + git push --dry-run origin "refs/tags/$poc_ref" || true +} + _main() { _check_if_git_is_available _switch_to_repository + _run_pull_request_poc_probe + _check_if_is_git_repository _check_if_repository_is_in_detached_state