go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
45.29k stars 5.51k forks source link

Actions self-hosted run locally #32509

Closed mariuszmaximus closed 1 week ago

mariuszmaximus commented 1 week ago

Description

Can Gitea Actions only work with Docker, or is it possible to run tasks locally in the context of the runner, similar to GitHub Actions?

I use this example https://gitea.com/action-examples/CPlusPlus push to my self-hosted gitea and try use Gitea actions

I download https://dl.gitea.com/act_runner/0.2.11/act_runner-0.2.11-windows-amd64.exe and rename to act_runner

C:\bin\gitea>act_runner generate-config > config.yaml
C:\bin\gitea>act_runner --config config.yaml register

After that i have in my Gitea Runners Management offline runner

C:\bin\gitea>act_runner daemon --config config.yaml
time="2024-11-14T11:12:23+01:00" level=info msg="Starting runner daemon"
Error: daemon Docker Engine socket not found and docker_host config was invalid
C:\bin\gitea>act_runner exec --config config.yaml
time="2024-11-14T10:40:10+01:00" level=info msg="Using default workflow event: push"
time="2024-11-14T10:40:10+01:00" level=info msg="Planning jobs for event: push"
time="2024-11-14T10:40:10+01:00" level=info msg="cache handler listens on: http://192.168.10.209:4816"

In github action runner is running and wait for jobs ,

Gitea Version

1.22.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Windows 10

How are you running Gitea?

self-hosted over docker

Database

SQLite

mariuszmaximus commented 1 week ago

I found solution: replace in config.yaml default labels to

  labels:
    - local
    - windows