Gitea Actions with container not working!

Hello,

Is it possible to use container like this? The following example runs perfect with act on my host but not with Gitea:

---
name: build
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-22.04
    container:
      image: python:3-alpine
    steps:
      - uses: actions/checkout@v3
      - name: build sphinx
        run: |
          pwd
          ls -la

Error actions/checkout@v3:

OCI runtime exec failed: exec failed: unable to start container process: exec: "node": executable file not found in $PATH: unknown

Thanks!

Please see Gitea actions: “Cannot find: node in PATH”. You will have to install NodeJS.

1 Like

But I’ am not using “Host-Mode”. If i remove these two lines:

    container:
      image: python:3-alpine

… i have no issues at all!

Because the image python:3-alpine hasn’t install nodejs.

Then there is no point for me. I thought “act_runner” is a simple solution for CI/CD but if every container has to include “nodejs” (+git) it’s quite an effort.

I thank everyone for the hard work they put into this project but I’ll stick with Drone for now.

You in fact could use git clone ... to instead of actions/checkout if you don’t want to install a nodejs currently. Of course, if there is an internal check out system which will not depend on nodejs, it’s better. We will consider the idea.

Thanks!

I don’t understand the connection, what is started on the node and what is started in containers…

Sorry for the late answer, was on holiday …
Thanks a lot, it works after installing NodeJS.
did not get that node as a software was meant by the error message. I assume node means a node of a data structure. I’m feeling stupid now :blush:

1 Like

Stumbled upon the same issue. Since act_runner docker image is based on Alpine, I just use below step to install required packages before I run Git Checkout step, so that npm / node requirement is fulfilled:
[…]

jobs:
  deploy:
    runs-on: host
    steps:
      - name: Base requirements
        run: |
          # packages
          apk update && apk add --no-cache git docker docker-compose nodejs gpg openssh npm ansible
          # ansible collections
          ansible-galaxy collection install community.general --force
          ansible-galaxy collection install ansible.posix --force

       - name: Checkout code
         uses: actions/checkout@v4
1 Like