bug: inconsistencies in repo URI parsing when running locally #619
Labels
No labels
FreeBSD
Kind/Breaking
Kind/Bug
Kind/Chore
Kind/DependencyUpdate
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
Windows
linux-powerpc64le
linux-riscv64
linux-s390x
run-end-to-end-tests
run-forgejo-tests
run-multi-platform-tests
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
forgejo/runner#619
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Can you reproduce the bug on the Forgejo test instance?
N/A
Description
When running
forgejo-runner execlocally in a Git repository there is a very weird interaction between--gitea-instanceand whether the repository's remote URI uses HTTPS or SSH.--gitea-instance--gitea-instance https://example.com--gitea-instance https://foo.comorigin = https://example.com/sclu1034/test.gitGITHUB_REPOSITORY_OWNER=
GITHUB_REPOSITORY_OWNER=sclu1034
GITHUB_REPOSITORY_OWNER=https:
origin = git@example.com:sclu1034/test.gitGITHUB_REPOSITORY_OWNER=sclu1034
GITHUB_REPOSITORY_OWNER=git@example.com:sclu1034
GITHUB_REPOSITORY_OWNER=git@example.com:sclu1034
(table scrolls horizontally)
Only in two out of those six cases I got the values I would have expected.
Forgejo Version
N/A
Runner Version
6.3.1
How are you running Forgejo?
N/A
How are you running the Runner?
Logs
Debug logs for the case
--gitea-instance https://example.com+git remote set-url origin git@example.com:sclu1034/test.git.time="2025-06-24T14:31:39+02:00" level=info msg="Using the only detected workflow event: push" time="2025-06-24T14:31:39+02:00" level=info msg="Planning job: test" time="2025-06-24T14:31:39+02:00" level=info msg="cache handler listens on: http://192.168.1.114:34595" time="2025-06-24T14:31:39+02:00" level=warning msg="unable to get git ref: reference not found" time="2025-06-24T14:31:39+02:00" level=info msg="Start server on http://192.168.1.114:34567" time="2025-06-24T14:31:39+02:00" level=warning msg="unable to get git revision: reference not found" [test.yaml/test] [DEBUG] evaluating expression 'success()' [test.yaml/test] [DEBUG] expression 'success()' evaluated to 'true' [test.yaml/test] 🚀 Start image=node:20-bullseye time="2025-06-24T14:31:39+02:00" level=info msg="Parallel tasks (0) below minimum, setting to 1" [test.yaml/test] 🐳 docker pull image=node:20-bullseye platform= username= forcePull=false [test.yaml/test] [DEBUG] 🐳 docker pull node:20-bullseye [test.yaml/test] [DEBUG] Image exists? true time="2025-06-24T14:31:40+02:00" level=info msg="Parallel tasks (0) below minimum, setting to 1" [test.yaml/test] 🐳 docker create image=node:20-bullseye platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-test-network" [test.yaml/test] [DEBUG] Common container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:false AttachStderr:false ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] Cmd:[] Healthcheck: ArgsEscaped:false Image:node:20-bullseye Volumes:map[] WorkingDir:/tmp/test Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout: Shell:[]} [test.yaml/test] [DEBUG] Common container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-test-network PortBindings:map[] RestartPolicy:{Name: MaximumRetryCount:0} AutoRemove:true VolumeDriver: VolumesFrom:[] ConsoleSize:[0 0] Annotations:map[] CapAdd:[] CapDrop:[] CgroupnsMode: DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] GroupAdd:[] IpcMode: Cgroup: Links:[] OomScoreAdj:0 PidMode: Privileged:false PublishAllPorts:false ReadonlyRootfs:false SecurityOpt:[] StorageOpt:map[] Tmpfs:map[] UTSMode: UsernsMode: ShmSize:0 Sysctls:map[] Runtime: Isolation: Resources:{CPUShares:0 Memory:0 NanoCPUs:0 CgroupParent: BlkioWeight:0 BlkioWeightDevice:[] BlkioDeviceReadBps:[] BlkioDeviceWriteBps:[] BlkioDeviceReadIOps:[] BlkioDeviceWriteIOps:[] CPUPeriod:0 CPUQuota:0 CPURealtimePeriod:0 CPURealtimeRuntime:0 CpusetCpus: CpusetMems: Devices:[] DeviceCgroupRules:[] DeviceRequests:[] KernelMemory:0 KernelMemoryTCP:0 MemoryReservation:0 MemorySwap:0 MemorySwappiness: OomKillDisable: PidsLimit: Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-env Target:/var/run/act ReadOnly:false Consistency: BindOptions: VolumeOptions: TmpfsOptions: ClusterOptions:} {Type:volume Source:FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test Target:/tmp/test ReadOnly:false Consistency: BindOptions: VolumeOptions: TmpfsOptions: ClusterOptions:}] MaskedPaths:[] ReadonlyPaths:[] Init:} [test.yaml/test] [DEBUG] input.NetworkAliases ==> [test] [test.yaml/test] [DEBUG] Created container name=FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test id=f6819befbd425220e275e6ed82e08a23b5a54e8780d603f9e125382b6d33596b from image node:20-bullseye (platform: ) [test.yaml/test] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8] [test.yaml/test] 🐳 docker run image=node:20-bullseye platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-test-network" [test.yaml/test] [DEBUG] Starting container: f6819befbd425220e275e6ed82e08a23b5a54e8780d603f9e125382b6d33596b [test.yaml/test] [DEBUG] Started container: f6819befbd425220e275e6ed82e08a23b5a54e8780d603f9e125382b6d33596b [test.yaml/test] [DEBUG] Writing entry to tarball workflow/event.json len:2 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/envs.txt len:0 [test.yaml/test] [DEBUG] Extracting content to '/var/run/act/' [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Skipping local actions/checkout because workdir was already copied [test.yaml/test] [DEBUG] skip pre step for 'Check out repository': no action model available [test.yaml/test] [DEBUG] expression 'echo "GITHUB_REPOSITORY=${{ env.GITHUB_REPOSITORY }}" echo "GITHUB_REPOSITORY_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }}" ' rewritten to 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] evaluating expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' evaluated to '%!t(string=echo "GITHUB_REPOSITORY=" echo "GITHUB_REPOSITORY_OWNER=" )' [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Skipping local actions/checkout because workdir was already copied [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] setupEnv => map[ACT:true ACTIONS_CACHE_URL:http://192.168.1.114:34595/ ACTIONS_RUNTIME_TOKEN:token ACTIONS_RUNTIME_URL:http://192.168.1.114:34567/ ACT_EXEC:true ACT_SKIP_CHECKOUT:true CI:true FORGEJO_TOKEN: GITHUB_ACTION:0 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF:v4 GITHUB_ACTION_REPOSITORY:actions/checkout GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://example.com/api/v1 GITHUB_BASE_REF: GITHUB_EVENT_NAME: GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL: GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/master GITHUB_REF_NAME:master GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:git@example.com:sclu1034/test.git GITHUB_REPOSITORY_OWNER:git@example.com:sclu1034 GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://example.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:test.yaml GITHUB_WORKSPACE:/tmp/test ImageOS:docker JOB_CONTAINER_NAME:FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID:] [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] evaluating expression '' [test.yaml/test] [DEBUG] expression '' evaluated to 'true' [test.yaml/test] ⭐ Run Main Check out repository [test.yaml/test] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/envs.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/SUMMARY.md len:0 [test.yaml/test] [DEBUG] Extracting content to '/var/run/act' [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] 🐳 docker cp src=/tmp/test/. dst=/tmp/test [test.yaml/test] [DEBUG] Writing tarball /tmp/act2084606761 from /tmp/test/. [test.yaml/test] [DEBUG] Stripping prefix:/tmp/test/ src:/tmp/test/. [test.yaml/test] [DEBUG] Extracting content from '/tmp/act2084606761' to '/tmp/test' [test.yaml/test] ✅ Success - Main Check out repository [test.yaml/test] [DEBUG] expression 'echo "GITHUB_REPOSITORY=${{ env.GITHUB_REPOSITORY }}" echo "GITHUB_REPOSITORY_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }}" ' rewritten to 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] evaluating expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' evaluated to '%!t(string=echo "GITHUB_REPOSITORY=" echo "GITHUB_REPOSITORY_OWNER=" )' [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] setupEnv => map[ACT:true ACTIONS_CACHE_URL:http://192.168.1.114:34595/ ACTIONS_RUNTIME_TOKEN:token ACTIONS_RUNTIME_URL:http://192.168.1.114:34567/ ACT_EXEC:true ACT_SKIP_CHECKOUT:true CI:true FORGEJO_TOKEN: GITHUB_ACTION:1 GITHUB_ACTIONS:true GITHUB_ACTION_PATH: GITHUB_ACTION_REF: GITHUB_ACTION_REPOSITORY: GITHUB_ACTOR:nektos/act GITHUB_API_URL:https://example.com/api/v1 GITHUB_BASE_REF: GITHUB_EVENT_NAME: GITHUB_EVENT_PATH:/var/run/act/workflow/event.json GITHUB_GRAPHQL_URL: GITHUB_HEAD_REF: GITHUB_JOB:test GITHUB_REF:refs/heads/master GITHUB_REF_NAME:master GITHUB_REF_TYPE:branch GITHUB_REPOSITORY:git@example.com:sclu1034/test.git GITHUB_REPOSITORY_OWNER:git@example.com:sclu1034 GITHUB_RETENTION_DAYS:0 GITHUB_RUN_ID:1 GITHUB_RUN_NUMBER:1 GITHUB_SERVER_URL:https://example.com GITHUB_SHA: GITHUB_TOKEN: GITHUB_WORKFLOW:test.yaml GITHUB_WORKSPACE:/tmp/test ImageOS:docker JOB_CONTAINER_NAME:FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test RUNNER_PERFLOG:/dev/null RUNNER_TRACKING_ID:] [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] evaluating expression '' [test.yaml/test] [DEBUG] expression '' evaluated to 'true' [test.yaml/test] [DEBUG] expression 'echo "GITHUB_REPOSITORY=${{ env.GITHUB_REPOSITORY }}" echo "GITHUB_REPOSITORY_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }}" ' rewritten to 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] evaluating expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' evaluated to '%!t(string=echo "GITHUB_REPOSITORY=" echo "GITHUB_REPOSITORY_OWNER=" )' [test.yaml/test] ⭐ Run Main echo "GITHUB_REPOSITORY=" echo "GITHUB_REPOSITORY_OWNER=" [test.yaml/test] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/envs.txt len:0 [test.yaml/test] [DEBUG] Writing entry to tarball workflow/SUMMARY.md len:0 [test.yaml/test] [DEBUG] Extracting content to '/var/run/act' [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] Loading revision from git directory [test.yaml/test] unable to get git ref: reference not found [test.yaml/test] unable to get git revision: reference not found [test.yaml/test] [DEBUG] expression 'echo "GITHUB_REPOSITORY=${{ env.GITHUB_REPOSITORY }}" echo "GITHUB_REPOSITORY_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }}" ' rewritten to 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] evaluating expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' [test.yaml/test] [DEBUG] expression 'format('echo "GITHUB_REPOSITORY={0}" echo "GITHUB_REPOSITORY_OWNER={1}" ', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' evaluated to '%!t(string=echo "GITHUB_REPOSITORY=git@example.com:sclu1034/test.git" echo "GITHUB_REPOSITORY_OWNER=git@example.com:sclu1034" )' [test.yaml/test] [DEBUG] Wrote commandecho "GITHUB_REPOSITORY=git@example.com:sclu1034/test.git"
echo "GITHUB_REPOSITORY_OWNER=git@example.com:sclu1034"
to 'workflow/1'
[test.yaml/test] [DEBUG] Writing entry to tarball workflow/1 len:117
[test.yaml/test] [DEBUG] Extracting content to '/var/run/act'
[test.yaml/test] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1] user= workdir=
[test.yaml/test] [DEBUG] Exec command '[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1]'
[test.yaml/test] [DEBUG] Working directory '/tmp/test'
[test.yaml/test] | GITHUB_REPOSITORY=git@example.com:sclu1034/test.git
[test.yaml/test] | GITHUB_REPOSITORY_OWNER=git@example.com:sclu1034
[test.yaml/test] ✅ Success - Main echo "GITHUB_REPOSITORY="
echo "GITHUB_REPOSITORY_OWNER="
[test.yaml/test] [DEBUG] expression 'echo "GITHUB_REPOSITORY=${{ env.GITHUB_REPOSITORY }}"
echo "GITHUB_REPOSITORY_OWNER=${{ env.GITHUB_REPOSITORY_OWNER }}"
' rewritten to 'format('echo "GITHUB_REPOSITORY={0}"
echo "GITHUB_REPOSITORY_OWNER={1}"
', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)'
[test.yaml/test] [DEBUG] evaluating expression 'format('echo "GITHUB_REPOSITORY={0}"
echo "GITHUB_REPOSITORY_OWNER={1}"
', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)'
[test.yaml/test] [DEBUG] expression 'format('echo "GITHUB_REPOSITORY={0}"
echo "GITHUB_REPOSITORY_OWNER={1}"
', env.GITHUB_REPOSITORY, env.GITHUB_REPOSITORY_OWNER)' evaluated to '%!t(string=echo "GITHUB_REPOSITORY="
echo "GITHUB_REPOSITORY_OWNER="
)'
[test.yaml/test] skipping post step for 'Check out repository': no action model available
[test.yaml/test] Cleaning up container for job test
[test.yaml/test] [DEBUG] Removed container: f6819befbd425220e275e6ed82e08a23b5a54e8780d603f9e125382b6d33596b
[test.yaml/test] [DEBUG] 🐳 docker volume rm FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test
[test.yaml/test] [DEBUG] 🐳 docker volume rm FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-env
[test.yaml/test] Cleaning up network for job test, and network name is: FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-test-network
[test.yaml/test] [DEBUG] [{none 5f6ae5dc2733b8aeab1b3fa9cef3c6b08345544145fd4f3dac8ce1b8951eeb39 2024-07-05 18:06:06.136231796 +0200 CEST local null false {default map[] []} false false false {} false map[] map[] map[] [] map[]} {bridge c0bb74281ac000f4a9491d5c83e5a9320a849616f0be7594a9f336d507c03937 2025-06-24 09:20:33.484775104 +0200 CEST local bridge false {default map[] [{172.17.0.0/16 172.17.0.1 map[]}]} false false false {} false map[] map[com.docker.network.bridge.default_bridge:true com.docker.network.bridge.enable_icc:true com.docker.network.bridge.enable_ip_masquerade:true com.docker.network.bridge.host_binding_ipv4:0.0.0.0 com.docker.network.bridge.name:docker0 com.docker.network.driver.mtu:1500] map[] [] map[]} {FORGEJO-ACTIONS-TASK-push_WORKFLOW-test-yaml_JOB-test-test-network 64f1b02a309c7ea25fd113ce2a2652617d36bb31af3bc47d36cec96d6d018504 2025-06-24 14:31:39.979864378 +0200 CEST local bridge false {default map[] [{172.18.0.0/16 172.18.0.1 map[]}]} false false false {} false map[] map[] map[] [] map[]} {host 44272440eb396a5390f7b387d955b83be298790a11d660d42f73d0d7175c4a78 2024-07-05 18:06:06.171001266 +0200 CEST local host false {default map[] []} false false false {} false map[] map[] map[] [] map[]}]
[test.yaml/test] 🏁 Job succeeded
[test.yaml/test] [DEBUG] Loading revision from git directory
[test.yaml/test] unable to get git ref: reference not found
[test.yaml/test] unable to get git revision: reference not found
Workflow file
bug: incorrect env variables when executing locally and the remote uses sshto bug: inconsistencies in repo URI parsing when running locallyAdditionally, if
actions/checkoutis configured with something likeref: ${{ github.event.pull_request.head.sha }}, then the checkout will fail on an SSH origin in all three cases.Works for me for SSH if i use
--gitea-instance example.com(without protocol).I think the right approach to
forgejo-runner execis to document what it does. However limited, it has value, even if only for learning at the beginning and exercising trivial workflows.Anything more sophisticated such as debugging actual workflows locally would require adding the ability to emulate via the CLI what the Forgejo instance communicates to the runner. I know it would be a large undertaking. And IMHO it would be a waste of time as it is better accomplished by launching a Forgejo instance locally and debug using that (Forgejo instance + Forgejo runner).
With that in mind I proposed an addition to the documentation and a help reduced to the supported options:
What do you think?
@sclu1034 before answering your review in detail, I would be grateful if you could share your thoughts on the above. 🙏
Just talking for myself, fo me a large value is the fast roundtrip time, also for more complex workflows. Roundtrip/feedback time is the very first think I try to optimize in all my workflows because it's the key to productivity. When I can run a workflow locally and see the results directly, it saves time. While I had to wait for a remote instance to pick up my build and look through the web ui to get the results, it breaks my workflow and slows me down.
The second is independency. I want do be always able to build and release, even when CI goes down. Otherwise CI becomes the same criticality as production. So I document how to build a project locally and ideally I just use the workflows here to avoid friction in emergency scenarios as much as possible.
Kind regards,
Michael.
What about running a local forgejo instance and attaching the runner to it instead of using
forgejo-runner exec? It has a marginal overhead (a oneliner with docker can do that) and you have a fully functional solution running locally instead of the extremely limited ersatzforgejo-runner execprovides.Is there a blocker preventing you from using this or is it a matter of personal preference?
The be clear, I fully understand the appeal of the general idea behind
forgejo-runner exec, i.e. running workflows from the CLI. The issue here is that the amount of work required to make that idea a reality (which it is not right now) is not only very large, it also duplicates a lot of what the runner already does when communicating with the Forgejo instance.This is not only weeks of full time work to get something working, it is also a long term effort to keep the two in sync as well as documenting what is just impossible to emulate with the CLI. Given that the current implementation is so limited that it could be considered only beneficial in a limited number of use cases, I think it is legitimate to ask the question... is it worth the pain?
I reiterate that the sane alternative is to run a Forgejo instance locally & attach the runner to it.
First I was not aware of this options since the runner comes from gitea runner which comes from act runner which has the main feature of running out of a CI ;-)
Also I'm not sure if/how this could be achieved by "a oneliner with docker". I'd assume that I'd have to do lot more steps like configuring the instance, creating repos, attaching a runner, pushing to the local repo, looking through the browser (which can be a mess for large log outputs). So I also assume that a "roundtrip" from change to result is way longer.
Maybe then the approach is not optimal. Could you explain what the communication between forgejo and the runner is? Maybe the can be part of a library that is used by the local runner or a ocal service where the runner can talk to
@earl-warren wrote in #619 (comment):
I strongly disagree. There's also
then for every repository you want to test with
git remoteschedule?schedulemeans I'm waiting a long time for the run to startschedulemeans it's running again and again in the background while I'm in the editorand instead of getting my logs in the next tmux pane, I need to
grepet alI also don't have access to the
-jflag, so either I have a lowrunner.capacityand potentially wait for other jobs to finish before the one I'm interested in, or have jobs run in parallel and hog resources unnecessarily.And I'd probably find more if I actually tried to set this up.
@micw wrote in #619 (comment):
For instance:
@sclu1034 wrote in #619 (comment):
Ok, this is drifting far away from the reported bug, it is best to focus on fixing it and drop other considerations for now. I asked for your opinion and it would not be right for me to dismiss it.