OCI runtime exec failed - Unable to start container process

I’m having some issues with gitea act runners and I was wondering if anyone might be familiar with this error message/translate what it means:

OCI runtime exec failed: exec failed: unable to start container process: chdir to cwd ("/workspace/SeatStock/seatstock-api/./backend/django") set in config.json failed: no such file or directory: unknown

I’m running Gitea via the snap package on an ubuntu 23.10 server. I had followed the guide for installing and setting up an actor and had succeeding getting it to register and connect. The docker engine is running in default root mode.

Here’s a link to the action yml file: name: "backend"on: pull_request: push: branches: - dev - Pastebin.com

It appears the action sets up properly and installs the node-alpine image but when it begins to perform the first step that takes place inside the docker container it fails immediately with that error. I’m under the impression that the setup-python step in the repository won’t work with node-alpine so I’ll probably have to make a custom image for this action, however I don’t think the error I’m experiencing is related to this (maybe I’m wrong)? Was hoping someone smarter than me might have an idea what’s going on here, is this a weird privileges issue with the act_runner & docker? I’ll also note that trying to spin up a docker container with node-alpine works fine when I try to run it directly, and the I did a sanity check with the docker hello-world image & it worked as expected.

The directory ./backend/django cannot be accessed?

Thanks for your comment lunny.

I found gitea promising for my CICD needs, but I have exact same error in first project.

The error I get doesn’t make sense in my view - missing node in $PATH:
runner1 | [Continuous Deployment/Build] | OCI runtime exec failed: exec failed: unable to start container process: exec: “node”: executable file not found in $PATH: unknown

I’m saying it doesn’t make sense, because I’m running Gitea runner in docker with exact same docker-compose.yaml as documented on Gitea.

Docker container images are built with all dependencies, and we never install dependencies on the host when running docker images.

Now, when I add node:lts as “container”, funnily, it successfully downloads the node:lts image, yet - doesn’t find node. There is no further log as to “who” is searching for node and in “which” container. I’m assuming this is runner1 in my case, using docker image gitea/act_runner:nightly. Using gitea/act_runner:latest doesn’t make a difference.

Also, second observation is, it does seem to checkout in “Set up job” step, but fail in “Check out repository code” step.

If I remove “Check out repository code” step and just put:
- run: ls -ltr /
It shows different error: “bash: /var/run/act/workflow/0: No such file or directory”

Are there any undocumented environment variables aside from those in Quickstart docker-based gitea self hosted server and runners?

Full log below, would you suggest anything further?

runner1  | time="2024-07-31T00:10:40Z" level=info msg="log level changed to debug" func="[initLogging]" file="[daemon.go:173]"
runner1  | time="2024-07-31T00:10:40Z" level=info msg="Starting runner daemon" func="[func6]" file="[daemon.go:39]"
runner1  | time="2024-07-31T00:10:40Z" level=debug msg="gc: 2024-07-31 00:10:40.018551277 +0000 UTC m=+0.035750304" func="[gcCache]" file="[handler.go:432]" module=artifactcache
runner1  | time="2024-07-31T00:10:40Z" level=info msg="runner: runner1, with version: v0.2.10+4-g2f78411, with labels: [ubuntu-latest ubuntu-22.04 ubuntu-20.04], declare successfully" func="[func6]" file="[daemon.go:119]"
runner1  | time="2024-07-31T00:10:44Z" level=info msg="task 19 repo is user/react-app-demo https://github.com http://git.localdomain" func="[run]" file="[runner.go:139]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Plan Stages: [0xc000011080]" func="[NewPlanExecutor]" file="[runner.go:135]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Stages Runs: [Build]" func="[func1]" file="[runner.go:142]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Name: Build" func="[func1]" file="[runner.go:145]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.RawNeeds: {2 0    <nil> []    0 0}" func="[func1]" file="[runner.go:146]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.RawRunsOn: {8 0 !!str ubuntu-latest  <nil> []    9 18}" func="[func1]" file="[runner.go:147]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Env: {0 0    <nil> []    0 0}" func="[func1]" file="[runner.go:148]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.If: {0 0  success()  <nil> []    0 0}" func="[func1]" file="[runner.go:149]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Steps: Check out repository code" func="[func1]" file="[runner.go:152]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Steps: npm i" func="[func1]" file="[runner.go:152]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.TimeoutMinutes: " func="[func1]" file="[runner.go:155]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Services: map[]" func="[func1]" file="[runner.go:156]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Strategy: <nil>" func="[func1]" file="[runner.go:157]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.RawContainer: {4 0 !!map   <nil> [0xc0004b4c80 0xc0004b4d20]    15 13}" func="[func1]" file="[runner.go:158]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Defaults.Run.Shell: " func="[func1]" file="[runner.go:159]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Defaults.Run.WorkingDirectory: " func="[func1]" file="[runner.go:160]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Outputs: map[]" func="[func1]" file="[runner.go:161]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Uses: " func="[func1]" file="[runner.go:162]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.With: map[]" func="[func1]" file="[runner.go:163]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job.Result: " func="[func1]" file="[runner.go:165]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Empty Strategy, matrixes=[map[]]" func="[GetMatrixes]" file="[workflow.go:486]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Job Matrices: [map[]]" func="[func1]" file="[runner.go:184]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Runner Matrices: map[]" func="[func1]" file="[runner.go:185]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Final matrix after applying user inclusions '[map[]]'" func="[func1]" file="[runner.go:188]"
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Detected CPUs: 4" func="[func1]" file="[runner.go:226]"
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression 'success()'
runner1  | [Continuous Deployment/Build] [DEBUG] expression 'success()' evaluated to 'true'
runner1  | [Continuous Deployment/Build] 🚀  Start image=node:lts
runner1  | [Continuous Deployment/Build]   🐳  docker pull image=node:lts platform= username= forcePull=true
runner1  | [Continuous Deployment/Build] [DEBUG]   🐳  docker pull node:lts
runner1  | time="2024-07-31T00:10:44Z" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[func1]" file="[executor.go:100]"
runner1  | [Continuous Deployment/Build] [DEBUG] pulling image 'docker.io/library/node:lts' ()
runner1  | [Continuous Deployment/Build] [DEBUG] Pulling from library/node :: lts
runner1  | [Continuous Deployment/Build] [DEBUG] Digest: sha256:1ae9ba874435551280e95c8a8e74adf8a48d72b564bf9dfe4718231f2144c88f :: 
runner1  | [Continuous Deployment/Build] [DEBUG] Status: Image is up to date for node:lts :: 
runner1  | [Continuous Deployment/Build] Cleaning up network for job Build, and network name is: GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network
runner1  | time="2024-07-31T00:10:47Z" level=debug msg="Parallel tasks (0) below minimum, setting to 1" func="[func2]" file="[executor.go:100]"
runner1  | [Continuous Deployment/Build]   🐳  docker create image=node:lts platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network"
runner1  | [Continuous Deployment/Build] [DEBUG] Custom container.Config from options ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:true ExposedPorts:map[] Tty:false OpenStdin:false StdinOnce:false Env:[] Cmd:[] Healthcheck:<nil> ArgsEscaped:false Image: Volumes:map[] WorkingDir: Entrypoint:[] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
runner1  | [Continuous Deployment/Build] [DEBUG] Merged container.Config ==> &{Hostname: Domainname: User: AttachStdin:false AttachStdout:true AttachStderr:true 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:<nil> ArgsEscaped:false Image:node:lts Volumes:map[] WorkingDir:/workspace/user/react-app-demo Entrypoint:[/bin/sleep 10800] NetworkDisabled:false MacAddress: OnBuild:[] Labels:map[] StopSignal: StopTimeout:<nil> Shell:[]}
runner1  | [Continuous Deployment/Build] [DEBUG] Custom container.HostConfig from options ==> &{Binds:[] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network PortBindings:map[] RestartPolicy:{Name:no MaximumRetryCount:0} AutoRemove:false 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:0xc0000faec0 OomKillDisable:0xc0000fadbb PidsLimit:0xc0000faf20 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
runner1  | [Continuous Deployment/Build] --network and --net in the options will be ignored.
runner1  | [Continuous Deployment/Build] [DEBUG] Merged container.HostConfig ==> &{Binds:[/var/run/docker.sock:/var/run/docker.sock] ContainerIDFile: LogConfig:{Type: Config:map[]} NetworkMode:GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network PortBindings:map[] RestartPolicy:{Name:no 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:0xc0000faec0 OomKillDisable:0xc0000fadbb PidsLimit:0xc0000faf20 Ulimits:[] CPUCount:0 CPUPercent:0 IOMaximumIOps:0 IOMaximumBandwidth:0} Mounts:[{Type:volume Source:act-toolcache Target:/opt/hostedtoolcache ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-env Target:/var/run/act ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>} {Type:volume Source:GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build Target:/workspace/user/react-app-demo ReadOnly:false Consistency: BindOptions:<nil> VolumeOptions:<nil> TmpfsOptions:<nil> ClusterOptions:<nil>}] MaskedPaths:[] ReadonlyPaths:[] Init:<nil>}
runner1  | [Continuous Deployment/Build] [DEBUG] Created container name=GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build id=a9df613340b8ad7e33b75a6fe123f21ee15e0f5ee6e67c9716f8f552e3c6ab17 from image node:lts (platform: )
runner1  | [Continuous Deployment/Build] [DEBUG] ENV ==> [RUNNER_TOOL_CACHE=/opt/hostedtoolcache RUNNER_OS=Linux RUNNER_ARCH=X64 RUNNER_TEMP=/tmp LANG=C.UTF-8]
runner1  | [Continuous Deployment/Build]   🐳  docker run image=node:lts platform= entrypoint=["/bin/sleep" "10800"] cmd=[] network="GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network"
runner1  | [Continuous Deployment/Build] [DEBUG] Starting container: a9df613340b8ad7e33b75a6fe123f21ee15e0f5ee6e67c9716f8f552e3c6ab17
runner1  | [Continuous Deployment/Build] [DEBUG] Started container: a9df613340b8ad7e33b75a6fe123f21ee15e0f5ee6e67c9716f8f552e3c6ab17
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/event.json len:4726
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Extracting content to '/var/run/act/'
runner1  | [Continuous Deployment/Build]   ☁  git clone 'https://github.com/actions/checkout' # ref=v4
runner1  | [Continuous Deployment/Build] [DEBUG]   cloning https://github.com/actions/checkout to /root/.cache/act/actions-checkout@v4
runner1  | [Continuous Deployment/Build] [DEBUG] Cloned https://github.com/actions/checkout to /root/.cache/act/actions-checkout@v4
runner1  | [Continuous Deployment/Build] [DEBUG] Checked out v4
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression ''
runner1  | [Continuous Deployment/Build] [DEBUG] expression '' evaluated to 'true'
runner1  | [Continuous Deployment/Build] ⭐ Run Main Check out repository code
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/SUMMARY.md len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Extracting content to '/var/run/act'
runner1  | [Continuous Deployment/Build] [DEBUG] expression '${{ github.repository }}' rewritten to 'format('{0}', github.repository)'
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression 'format('{0}', github.repository)'
runner1  | [Continuous Deployment/Build] [DEBUG] expression 'format('{0}', github.repository)' evaluated to '%!t(string=user/react-app-demo)'
runner1  | [Continuous Deployment/Build] [DEBUG] expression '${{ github.token }}' rewritten to 'format('{0}', github.token)'
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression 'format('{0}', github.token)'
runner1  | [Continuous Deployment/Build] [DEBUG] expression 'format('{0}', github.token)' evaluated to '%!t(string=***)'
runner1  | [Continuous Deployment/Build] [DEBUG] type=remote-action actionDir=/root/.cache/act/actions-checkout@v4 actionPath= workdir=/workspace/user/react-app-demo actionCacheDir=/root/.cache/act actionName=actions-checkout@v4 containerActionDir=/var/run/act/actions/actions-checkout@v4
runner1  | [Continuous Deployment/Build] [DEBUG] /var/run/act/actions/actions-checkout@v4
runner1  | [Continuous Deployment/Build] [DEBUG] Removing /root/.cache/act/actions-checkout@v4/.gitignore before docker cp
runner1  | [Continuous Deployment/Build]   🐳  docker cp src=/root/.cache/act/actions-checkout@v4/ dst=/var/run/act/actions/actions-checkout@v4/
runner1  | [Continuous Deployment/Build] [DEBUG] Writing tarball /tmp/act1445951625 from /root/.cache/act/actions-checkout@v4/
runner1  | [Continuous Deployment/Build] [DEBUG] Stripping prefix:/root/.cache/act/actions-checkout@v4/ src:/root/.cache/act/actions-checkout@v4/
runner1  | [Continuous Deployment/Build] [DEBUG] Extracting content from '/tmp/act1445951625' to '/var/run/act/actions/actions-checkout@v4/'
runner1  | [Continuous Deployment/Build] [DEBUG] executing remote job container: [node /var/run/act/actions/actions-checkout@v4/dist/index.js]
runner1  | [Continuous Deployment/Build]   🐳  docker exec cmd=[node /var/run/act/actions/actions-checkout@v4/dist/index.js] user= workdir=
runner1  | [Continuous Deployment/Build] [DEBUG] Exec command '[node /var/run/act/actions/actions-checkout@v4/dist/index.js]'
runner1  | [Continuous Deployment/Build] [DEBUG] Working directory '/workspace/user/react-app-demo'
runner1  | [Continuous Deployment/Build]   | OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown
runner1  | [Continuous Deployment/Build]   ❌  Failure - Main Check out repository code
runner1  | [Continuous Deployment/Build] exitcode '126': failure
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression ''
runner1  | [Continuous Deployment/Build] [DEBUG] expression '' evaluated to 'false'
runner1  | [Continuous Deployment/Build] [DEBUG] Skipping step 'npm i' due to ''
runner1  | [Continuous Deployment/Build] [DEBUG] evaluating expression 'always()'
runner1  | [Continuous Deployment/Build] [DEBUG] expression 'always()' evaluated to 'true'
runner1  | [Continuous Deployment/Build] ⭐ Run Post Check out repository code
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/outputcmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/statecmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/pathcmd.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/envs.txt len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Writing entry to tarball workflow/SUMMARY.md len:0
runner1  | [Continuous Deployment/Build] [DEBUG] Extracting content to '/var/run/act'
runner1  | [Continuous Deployment/Build] [DEBUG] run post step for 'Check out repository code'
runner1  | [Continuous Deployment/Build] [DEBUG] executing remote job container: [node /var/run/act/actions/actions-checkout@v4/dist/index.js]
runner1  | [Continuous Deployment/Build]   🐳  docker exec cmd=[node /var/run/act/actions/actions-checkout@v4/dist/index.js] user= workdir=
runner1  | [Continuous Deployment/Build] [DEBUG] Exec command '[node /var/run/act/actions/actions-checkout@v4/dist/index.js]'
runner1  | [Continuous Deployment/Build] [DEBUG] Working directory '/workspace/user/react-app-demo'
runner1  | [Continuous Deployment/Build]   | OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown
runner1  | [Continuous Deployment/Build]   ❌  Failure - Post Check out repository code
runner1  | [Continuous Deployment/Build] Cleaning up container for job Build
runner1  | [Continuous Deployment/Build] [DEBUG] Removed container: a9df613340b8ad7e33b75a6fe123f21ee15e0f5ee6e67c9716f8f552e3c6ab17
runner1  | [Continuous Deployment/Build] [DEBUG]   🐳  docker volume rm GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build
runner1  | [Continuous Deployment/Build] [DEBUG]   🐳  docker volume rm GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-env
runner1  | [Continuous Deployment/Build] Cleaning up network for job Build, and network name is: GITEA-ACTIONS-TASK-19_WORKFLOW-Continuous-Deployment_JOB-Build-Build-network
runner1  | [Continuous Deployment/Build] 🏁  Job failed

s

The gitea/act_runner (Alpine Linux) docker container will call a gitea runner instance (Ubuntu). Think of the act runner container as the “glue” that makes actions possible. The gitea/act_runner does not run the jobs itself but rather uses its docker.socket privleges to execute another container (Ubuntu).

Take a look at a sucessful execution of set up job:

gt-cyg-run(version:v0.2.10) received task 42 of job 41, be triggered by event: push
workflow prepared
evaluating expression 'success()'
expression 'success()' evaluated to 'true'
🚀  Start image=gitea/runner-images:ubuntu-latest
  🐳  docker pull image=gitea/runner-images:ubuntu-latest platform= username= forcePull=false
  🐳  docker pull gitea/runner-images:ubuntu-latest
Image exists? true

Notice that is uses docker to pull a runner image. This runner image has all of the proper dependancies for most usecases and commands such as node are properly set in path.

Take a look at an example build.yaml

name: Checkout
on: push
jobs:
  build-linux-binary:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - run: pwd
    - run: ls -ltr
    - run: lsb_release -a

If you run this, pay special note to lsb_release -a.

The runs-on: ubuntu-latest corresponds to a runner. In this case my runner gt-cyg-run has a label ubuntu-latest which tells gitea: “When I use this label, use any runner that has registered with this label.”

Now, you haven’t given us your yaml file, but I would venture to guess you implicitly set node:lts as the container to run the actions on. While you could do that, it is a more advanced technique that requires additional setup.

If you have used the default settings of the gitea/act_runner, I would recommend not specifying an image as it is designed to be implicit.

I am BTW aware of server-client architecture used by other CICDs tools, hence aware of the runners.

I expected act_runner to pull repo from gitea instance in the first place, before executing any steps, which doesn’t seem to be the way things work in gitea/act_runner, hence recording my steps here to help others following same track.

I should mention though, on GitHub I copied this exact same react-app-demo repo and there the checkout worked in first run; but that’s SaaS, and I may be missing something in my self hosted gitea instance environment/runner.

I’m troubleshooting this further, and have changed the yaml several times, I even forgot where I started. Also results progressed, and I don’t know to keep it in this thread or separate the below:

For our discussion, its just this:

name: Continuous Deployment

on:
  push:
    branches:
      - main

jobs:
  Explore-GitHub-Actions:
    runs-on: ubuntu-latest
    container:
      image: node:lts-alpine
    steps:
      - uses: actions/checkout@v4
      - run: npm i && npm run build

I troubleshooted with a brand new ubuntu 24 vm with act_runner manual download binary way, and I’m unsure if the error went away because of that.

To troubleshoot it further, I tried to build own act_runner docker image; which has progressed my troubleshooting now to level where these errors are not there, but now it doesn’t find the repo.

I also tried gitea/act_runner and it also seems to now provide exact same results - even on alpine host.

In case of other CICD tools, checkout isn’t even a step, it is assumed that source code should be there to start with. I’m now thinking gitea actions run differently to those I worked with (e.g. Drone/TeamCity, etc.)

::add-matcher::/run/act/actions/actions-checkout@v4/dist/problem-matcher.json
Syncing repository: user/react-app-demo
::group::Getting Git version info
Working directory is '/workspace/user/react-app-demo'
::endgroup::
Deleting the contents of '/workspace/user/react-app-demo'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
Not found.

Waiting 11 seconds before trying again
Downloading the archive
Not found.

Waiting 19 seconds before trying again
Downloading the archive
::remove-matcher owner=checkout-git::
::error::Not found.%0A

For changing sequence to lookup repo, which was earlier:

INFO[2024-07-31T08:33:45Z] task 57 repo is user/react-app-demo https://github.com http://git.localdomain

I tried setting:

[actions]
DEFAULT_ACTIONS_URL=self

resulting in:

INFO[2024-07-31T08:33:45Z] task 64 repo is user/react-app-demo http://git.localdomain http://git.localdomain

It still doesn’t find repo.
however git clone http://git.localdomain/user/react-app-demo does checkout.

Sorry to dump my observations, I’m still troubleshooting as I’m wanting to setup gitea as replacement for Drone, but I need somewhere to start. Thanks!

Also, I don’t understand this one:

If you have used the default settings of the gitea/act_runner , I would recommend not specifying an image as it is designed to be implicit.

Do you mean to say, act_runner will infer which version of what software from steps? e.g. below doesn’t say which version or which distribution:

node index.js

Hence why I am trying to use node:lts image. It feels a bit crude/obsolete way to use actions/setup-node or something like that - (which inturn will cause to “build” image locally which are already available on docker hub) - but I’m happy going either way as long as it works self-hosted, with the software version I need.

Update:

The latest working version is this:

name: Continuous Deployment

on:
  push:
    branches:
      - main

jobs:
  Build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: lts/iron
      - run: |
          node -v
          npm i -g yarn npm-check-updates
      - uses: actions/checkout@v4
      - run: |
          pwd
          ls -la .
          PATH=$PATH:node_modules/.bin
          which yarn
          yarn
          yarn build

Also, I forgot to mention earlier: I added this to gitea app.ini - I’m not sure this changed anything - default ini had no units listed.

DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects,repo.packages,repo.actions

I also removed:

[actions]
DEFAULT_ACTIONS_URL=self

This is now working with ubuntu based os and gitea/act_runner. Same doesn’t work for my custom alpine image - seems this is narrowed down to alpine image.

@jblu, Thanks for pointing me to correct direction!

Yes, when specifying the following:

    container:
      image: node:lts-alpine

It will override the implicit build container gitea/runner-images:ubuntu-latest.

I too have experience with drone.io self hosted runners. If I may recommend shipping a dockerfile in your repo and using the docker/build-push-action or something similar(I haven’t used it.) This may serve a similar purpose like an existing drone workflow such as this:

.drone.yaml

kind: pipeline
name: default
steps:
- name: docker
  image: plugins/docker
  settings:
    registry: git.example.com
    dry_run: false
    username: user
    password: 
      from_secret: gittea_drone
    repo: git.example.com/user/repo
    tags:
    - latest
  when:
    branch:
      - main
    event:
      - push

You could build your own container, push it to your registry, then run tests or build actions on it. I’m glad to hear its working. Setting up CI/CD can be so finicky.

1 Like