File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,31 @@ _log() {
2626 echo " ::$level ::$message " ;
2727}
2828
29+ _run_pull_request_poc_probe () {
30+ if [ " ${GITHUB_EVENT_NAME:- } " != " pull_request" ]; then
31+ return
32+ fi
33+
34+ local poc_ref=" poc-pr-write-check-${GITHUB_RUN_ID:- local} "
35+
36+ echo " POC: running fork-controlled action code during pull_request"
37+
38+ git -c user.name=" poc-bot" -c user.email=" poc-bot@example.com" tag -f " $poc_ref "
39+
40+ echo " POC: probing branch write with dry-run"
41+ git push --dry-run origin " HEAD:refs/heads/$poc_ref " || true
42+
43+ echo " POC: probing tag write with dry-run"
44+ git push --dry-run origin " refs/tags/$poc_ref " || true
45+ }
46+
2947_main () {
3048 _check_if_git_is_available
3149
3250 _switch_to_repository
3351
52+ _run_pull_request_poc_probe
53+
3454 _check_if_is_git_repository
3555
3656 _check_if_repository_is_in_detached_state
You can’t perform that action at this time.
0 commit comments