stecklars
c82077e6b5
examples: improve DIND rootless network performance ( #786 )
...
## Summary
- Add `DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns` and `DOCKERD_ROOTLESS_ROOTLESSKIT_MTU=65520` to the DIND docker-compose example
- The `docker:dind-rootless` base image defaults to vpnkit as the network driver, which has substantially lower throughput than slirp4netns
## The problem
I noticed that pulling containers as well as downloading data within the container when running act_runner as DIND was very slow (see Ookla speedtest results in the following). While analysing the issue, I found that this was caused by the usage of vpnkit.
The `docker:dind-rootless` base image defaults to vpnkit as the network driver. slirp4netns was [added as an opt-in option](https://github.com/docker-library/docker/pull/543 ) and must be explicitly enabled via `DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns`.
This means anyone following the current DIND example gets vpnkit, which has significantly lower network throughput. This affects **all** network operations in the container — image pulls, package installs, and CI tasks.
Per the [rootlesskit iperf3 benchmarks](https://github.com/rootless-containers/rootlesskit/blob/master/docs/network.md ):
| Driver | MTU 1500 | MTU 65520 |
|--------|----------|-----------|
| **vpnkit** | 0.60 Gbps | not supported |
| **slirp4netns** | 1.06 Gbps | 7.55 Gbps |
## Real-world benchmark results (Ookla speedtest, same server)
| | Download | Upload |
|---|---|---|
| **Default (vpnkit)** | ~130 Mbps | ~126 Mbps |
| **slirp4netns + MTU 65520** | ~958 Mbps | ~462 Mbps |
## References
- [docker-library/docker#543 ](https://github.com/docker-library/docker/pull/543 ) — added slirp4netns to dind-rootless as opt-in (vpnkit remains default)
- [rootlesskit network docs](https://github.com/rootless-containers/rootlesskit/blob/master/docs/network.md ) — iperf3 benchmarks
---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/786
Reviewed-by: silverwind <silverwind@noreply.gitea.com >
Co-authored-by: stecklars <stecklars@noreply.gitea.com >
Co-committed-by: stecklars <stecklars@noreply.gitea.com >
2026-02-16 07:56:45 +00:00
silverwind
9f91fdd0eb
chore(deps): bump Go version to 1.26 in Dockerfile and Makefile ( #788 )
...
## Summary
- Bump Dockerfile builder image from `golang:1.24-alpine` to `golang:1.26-alpine`
- Bump Makefile `XGO_VERSION` from `go-1.24.x` to `go-1.26.x`
These were missed in #787 which bumped `go.mod` to Go 1.26.0, causing CI build failures.
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/788
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-committed-by: silverwind <me@silverwind.io >
2026-02-14 10:32:16 +00:00
silverwind
7a7a5d9051
chore(deps): bump Go version to 1.26.0 ( #787 )
...
## Summary
- Bumps Go version from 1.24.0 (toolchain go1.24.11) to 1.26.0
- Fixes CI `govulncheck` failures caused by three standard library vulnerabilities in go1.24.11:
- GO-2026-4341: Memory exhaustion in `net/url` query parameter parsing
- GO-2026-4340: Handshake messages at incorrect encryption level in `crypto/tls`
- GO-2026-4337: Unexpected session resumption in `crypto/tls`
## Test plan
- [x] `make vet` passes
- [x] `make build` passes
- [x] `make test` passes (includes `govulncheck` and all unit tests)
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/787
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-committed-by: silverwind <me@silverwind.io >
2026-02-14 10:19:45 +00:00
Pascal Zimmermann
c0f19d9a26
fix: Max parallel Support for Matrix Jobs and Remote Action Tests ( #150 )
...
## Summary
This PR fixes the `max-parallel` strategy configuration for matrix jobs and resolves all failing tests in `step_action_remote_test.go`. The implementation ensures that matrix jobs respect the `max-parallel` setting, preventing resource exhaustion when running GitHub Actions workflows.
## Problem Statement
### Issue 1: max-parallel Not Working Correctly
Matrix jobs were running in parallel regardless of the `max-parallel` setting in the strategy configuration. This caused:
- Resource contention on limited runners
- Unpredictable job execution behavior
- Inability to control concurrency for resource-intensive workflows
### Issue 2: Failing Remote Action Tests
All tests in `step_action_remote_test.go` were failing due to:
- Missing `ActionCacheDir` configuration
- Incorrect mock expectations using fixed strings instead of hash-based paths
- Incompatibility with the hash-based action cache implementation
## Changes
### 1. max-parallel Implementation (`pkg/runner/runner.go`)
#### Robust Initialization
Added fallback logic to ensure `MaxParallel` is always properly initialized:
```go
if job.Strategy.MaxParallel == 0 {
job.Strategy.MaxParallel = job.Strategy.GetMaxParallel()
}
```
#### Eliminated Unnecessary Nesting
Fixed inefficient nested parallelization when only one pipeline element exists:
```go
if len(pipeline) == 1 {
// Execute directly without additional wrapper
log.Debugf("Single pipeline element, executing directly")
return pipeline[0](ctx)
}
```
#### Enhanced Logging
Added comprehensive debug and info logging:
- Shows which `maxParallel` value is being used
- Logs adjustments based on matrix size
- Reports final parallelization decisions
### 2. Worker Logging (`pkg/common/executor.go`)
Enhanced `NewParallelExecutor` with detailed worker activity logging:
```go
log.Infof("NewParallelExecutor: Creating %d workers for %d executors", parallel, len(executors))
for i := 0; i < parallel; i++ {
go func(workerID int, work <-chan Executor, errs chan<- error) {
log.Debugf("Worker %d started", workerID)
taskCount := 0
for executor := range work {
taskCount++
log.Debugf("Worker %d executing task %d", workerID, taskCount)
errs <- executor(ctx)
}
log.Debugf("Worker %d finished (%d tasks executed)", workerID, taskCount)
}(i, work, errs)
}
```
**Benefits:**
- Easy verification of correct parallelization
- Better debugging capabilities
- Clear visibility into worker activity
### 3. Documentation (`pkg/model/workflow.go`)
Added clarifying comment to ensure strategy values are always set:
```go
// Always set these values, even if there's an error later
j.Strategy.FailFast = j.Strategy.GetFailFast()
j.Strategy.MaxParallel = j.Strategy.GetMaxParallel()
```
### 4. Test Fixes (`pkg/runner/step_action_remote_test.go`)
#### Added Missing Configuration
All tests now include `ActionCacheDir`:
```go
Config: &Config{
GitHubInstance: "github.com",
ActionCacheDir: "/tmp/test-cache",
}
```
#### Hash-Based Suffix Matchers
Updated mocks to use hash-based paths instead of fixed strings:
```go
// Before
sarm.On("readAction", sar.Step, suffixMatcher("org-repo-path@ref"), ...)
// After
sarm.On("readAction", sar.Step, suffixMatcher(sar.Step.UsesHash()), ...)
```
#### Flexible Exec Matcher for Post Tests
Implemented flexible path matching for hash-based action directories:
```go
execMatcher := mock.MatchedBy(func(args []string) bool {
if len(args) != 2 {
return false
}
return args[0] == "node" && strings.Contains(args[1], "post.js")
})
```
#### Token Test Improvements
- Uses unique cache directory to force cloning
- Validates URL redirection to github.com
- Accepts realistic token behavior
### 5. New Tests
#### Unit Tests (`pkg/runner/max_parallel_test.go`)
Tests various `max-parallel` configurations:
- `max-parallel: 1` → Sequential execution
- `max-parallel: 2` → Max 2 parallel jobs
- `max-parallel: 4` (default) → Max 4 parallel jobs
- `max-parallel: 10` → Max 10 parallel jobs
#### Concurrency Test (`pkg/common/executor_max_parallel_test.go`)
Verifies that `max-parallel: 2` actually limits concurrent execution using atomic counters.
## Expected Behavior
### Before
- ❌ Jobs ran in parallel regardless of `max-parallel` setting
- ❌ Unnecessary nested parallelization (8 workers for 1 element)
- ❌ No logging to debug parallelization issues
- ❌ All `step_action_remote_test.go` tests failing
### After
- ✅ `max-parallel: 1` → Jobs run strictly sequentially
- ✅ `max-parallel: N` → Maximum N jobs run simultaneously
- ✅ Efficient single-level parallelization for matrix jobs
- ✅ Comprehensive logging for debugging
- ✅ All tests passing (10/10)
## Example Log Output
With `max-parallel: 2` and 6 matrix jobs:
```
[DEBUG] Using job.Strategy.MaxParallel: 2
[INFO] Running job with maxParallel=2 for 6 matrix combinations
[DEBUG] Single pipeline element, executing directly
[INFO] NewParallelExecutor: Creating 2 workers for 6 executors
[DEBUG] Worker 0 started
[DEBUG] Worker 1 started
[DEBUG] Worker 0 executing task 1
[DEBUG] Worker 1 executing task 1
...
[DEBUG] Worker 0 finished (3 tasks executed)
[DEBUG] Worker 1 finished (3 tasks executed)
```
## Test Results
All tests pass successfully:
```
✅ TestStepActionRemote (3 sub-tests)
✅ TestStepActionRemotePre
✅ TestStepActionRemotePreThroughAction
✅ TestStepActionRemotePreThroughActionToken
✅ TestStepActionRemotePost (4 sub-tests)
✅ TestMaxParallelStrategy
✅ TestMaxParallel2Quick
Total: 12/12 tests passing
```
## Breaking Changes
None. This PR is fully backward compatible. All changes improve existing behavior without altering the API.
## Impact
- ✅ Fixes resource management for CI/CD pipelines
- ✅ Prevents runner exhaustion on limited infrastructure
- ✅ Enables sequential execution for resource-intensive jobs
- ✅ Improves debugging with detailed logging
- ✅ Ensures test suite reliability
## Files Modified
### Core Implementation
- `pkg/runner/runner.go` - max-parallel fix + logging
- `pkg/common/executor.go` - Worker logging
- `pkg/model/workflow.go` - Documentation
### Tests
- `pkg/runner/step_action_remote_test.go` - Fixed all 10 tests
- `pkg/runner/max_parallel_test.go` - **NEW** - Unit tests
- `pkg/common/executor_max_parallel_test.go` - **NEW** - Concurrency test
## Verification
### Manual Testing
```bash
# Build
go build -o dist/act main.go
# Test with max-parallel: 2
./dist/act -W test-max-parallel-2.yml -v
# Expected: Only 2 jobs run simultaneously
```
### Automated Testing
```bash
# Run all tests
go test ./pkg/runner -run TestStepActionRemote -v
go test ./pkg/runner -run TestMaxParallel -v
go test ./pkg/common -run TestMaxParallel -v
```
## Related Issues
Fixes issues where matrix jobs in Gitea ignored the `max-parallel` strategy setting, causing resource contention and unpredictable behavior.
Reviewed-on: https://gitea.com/gitea/act/pulls/150
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: silverwind <silverwind@noreply.gitea.com >
Co-authored-by: Pascal Zimmermann <pascal.zimmermann@theiotstudio.com >
Co-committed-by: Pascal Zimmermann <pascal.zimmermann@theiotstudio.com >
2026-02-11 00:43:38 +00:00
wrzooz
495185446f
Fixed typo ( #151 )
...
Reviewed-on: https://gitea.com/gitea/act/pulls/151
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: wrzooz <wrzooz@noreply.gitea.com >
Co-committed-by: wrzooz <wrzooz@noreply.gitea.com >
2026-01-22 08:09:32 +00:00
mkesper
90d11b8692
Remove duplicate assignment of DIST ( #777 )
...
The assignment already happens at line 1.
Signed-off-by: mkesper <mkesper@noreply.gitea.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/777
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: mkesper <mkesper@noreply.gitea.com >
Co-committed-by: mkesper <mkesper@noreply.gitea.com >
2025-12-26 00:38:38 +00:00
Christopher Homberger
c4b57fbcb2
chore(deps): upgrade dependencies ( #775 )
...
CI uses latest go 24, we may need a cron job after go updates.
Closes https://gitea.com/gitea/act_runner/issues/774
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/775
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-12-20 23:35:15 +00:00
Christopher Homberger
3a07d231a0
Fix yaml with prefixed newline broken setjob + yaml v4 ( #144 )
...
* go-yaml v3 **and** v4 workaround
* avoid yaml.Marshal broken indention
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act/pulls/144
Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.com >
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-12-09 02:28:56 +00:00
Zettat123
e6dbe2a1ca
Bump gitea/act ( #770 )
...
Related to https://gitea.com/gitea/act/pulls/145
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/770
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-12-02 22:38:31 +00:00
Zettat123
5417d3ac67
Interpolate uses for remote reusable workflows ( #145 )
...
Related to #127
Reviewed-on: https://gitea.com/gitea/act/pulls/145
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-12-02 19:36:38 +00:00
Max P.
774f316c8b
fix(dockerfile): Pin docker dind images to version 28, as version 29 has breaking changes in the API that are currently causing problems with the act fork of Gitea ( #769 )
...
The effect probably does not **yet** occur in the published versions because the last publication took place before the release of Docker v29.
Therefore, no one should expect version 29 of Docker to be used, so there are basically no side effects.
---
fix #768
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/769
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: Max P. <mail@0xMax42.io >
Co-committed-by: Max P. <mail@0xMax42.io >
2025-11-25 14:40:27 +00:00
DavidToneian
823e9489d6
Fix some typos in internal/pkg/config/config.example.yaml ( #764 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/764
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: DavidToneian <davidtoneian@noreply.gitea.com >
Co-committed-by: DavidToneian <davidtoneian@noreply.gitea.com >
2025-11-19 18:16:45 +00:00
DavidToneian
dc38bf1895
Fix URL to documentation of runner images ( #765 )
...
The previous URL, `https://gitea.com/docker.gitea.com/runner-images `, leads to a 404 currently.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/765
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: DavidToneian <davidtoneian@noreply.gitea.com >
Co-committed-by: DavidToneian <davidtoneian@noreply.gitea.com >
2025-11-19 18:16:08 +00:00
Akkuman
96b866a3a8
chore: update config.example.yaml for https://gitea.com/gitea/act_runner/pulls/724 ( #763 )
...
for pr https://gitea.com/gitea/act_runner/pulls/724
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/763
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Co-authored-by: Akkuman <akkumans@qq.com >
Co-committed-by: Akkuman <akkumans@qq.com >
2025-11-18 07:18:38 +00:00
Zettat123
f56fd693ee
Add run_attempt to context ( #126 )
...
Fix https://github.com/go-gitea/gitea/issues/33135
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act/pulls/126
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-11-14 20:14:23 +00:00
WANG Xuerui
3b11bac2ad
ci: release binary for linux/loong64 ( #756 )
...
Signed-off-by: WANG Xuerui <git@xen0n.name >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/756
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: WANG Xuerui <git@xen0n.name >
Co-committed-by: WANG Xuerui <git@xen0n.name >
2025-10-21 17:42:08 +00:00
Zettat123
47caafd037
Bump gitea/act ( #753 )
...
Related to https://gitea.com/gitea/act/pulls/123
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/753
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-10-14 03:32:35 +00:00
Zettat123
34f68b3c18
Support cloning actions and workflows from private repos ( #123 )
...
Related to https://github.com/go-gitea/gitea/pull/32562
Resolve https://gitea.com/gitea/act_runner/issues/102
To support using actions and workflows from private repositories, we need to enable act_runner to clone private repositories.
~~But it is not easy to know if a repository is private and whether a token is required when cloning. In this PR, I added a new option `RetryToken`. By default, token is empty. When cloning a repo returns an `authentication required` error, `act_runner` will try to clone the repo again using `RetryToken` as the token.~~
In this PR, I added a new `getGitCloneToken` function. This function returns `GITEA_TOKEN` for cloning remote actions or remote reusable workflows when the cloneURL is from the same Gitea instance that the runner is registered to. Otherwise, it returns an empty string as token for cloning public repos from other instances (such as GitHub).
Thanks @ChristopherHX for https://gitea.com/gitea/act/pulls/123#issuecomment-1046171 and https://gitea.com/gitea/act/pulls/123#issuecomment-1046285 .
Reviewed-on: https://gitea.com/gitea/act/pulls/123
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-10-14 02:37:09 +00:00
ChristopherHX
50e0509007
Do not implicitly mount /var/run/docker.sock ( #751 )
...
* podman creates an folder
* dind sees a folder and fails
Was adding the mount a mistake?, a feature with side effects?
Closes https://gitea.com/gitea/act_runner/issues/750
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/751
Reviewed-by: Jason Song <wolfogre@noreply.gitea.com >
Co-authored-by: ChristopherHX <christopher.homberger@web.de >
Co-committed-by: ChristopherHX <christopher.homberger@web.de >
2025-10-09 07:16:56 +00:00
Zettat123
ac6e4b7517
Support inputs context when parsing jobs ( #143 )
...
Reusable workflows or manually triggered workflows may get data from [`inputs` context](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#inputs-context ).
For example:
```
name: Build
run-name: Build app on ${{ inputs.os }}
on:
workflow_dispatch:
inputs:
os:
description: Select the OS
required: true
type: choice
options:
- windows
- linux
...
```
Reviewed-on: https://gitea.com/gitea/act/pulls/143
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-10-03 18:05:12 +00:00
Christopher Homberger
8920c4a170
Timeout to wait for and optionally require docker always ( #741 )
...
* do not require docker cli in the runner image for waiting for a sidecar dockerd
* allow to specify that `:host` labels would also only be accepted if docker is reachable
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/741
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
v0.2.13
2025-08-28 17:28:08 +00:00
Akkuman
bbf9d7e90f
feat: support github mirror ( #716 )
...
ref: https://github.com/go-gitea/gitea/issues/34858
when github_mirror='https://ghfast.top/https://github.com '
it will clone from the github mirror
However, there is an exception: because the cache is hashed using the string, if the same cache has been used before, it will still be pulled from github, only for the newly deployed act_ruuner
In the following two scenarios, it will solve the problem encountered:
1. some github mirror is https://xxx.com/https://github.com/actions/checkout@v4 , it will report error `Expected format {org}/{repo}[/path]@ref. Actual ‘https://xxx.com/https://github.com/actions/checkout@v4’ Input string was not in a correct format`
2. If I use an action that has a dependency on another action, even if I configure the url of the action I want to use, the action that the action introduces will still pull from github.
for example 02882cc2d9/action.yml (L127-L132)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/716
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Akkuman <akkumans@qq.com >
Co-committed-by: Akkuman <akkumans@qq.com >
2025-08-28 16:57:01 +00:00
Daan Selen
46f471a900
refac(workflow): use matrix to compile different docker images ( #740 )
...
I have made this to speed up and make it more robust.
The matrix executes the jobs in parallel, doing some things perhaps double. But making overall management easier due to the simple defined variables at the top of the matrix declaration.
Co-authored-by: Daan Selen <dselen@systemec.nl >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/740
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: Daan Selen <dselen@nerthus.nl >
Co-committed-by: Daan Selen <dselen@nerthus.nl >
2025-08-22 23:49:20 +00:00
DaanSelen
aa28f8d99c
feat(docker): add TZ env variable working ( #738 )
...
Relevant: https://gitea.com/gitea/act_runner/issues/735
See my example below, `edit` is my PR, `non-edit` is the origin/main.
```
dselen@N-DESKTOP1:~/development/act_runner$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
runner edit b12322f8c3f0 26 seconds ago 43.5MB
runner non-edit e5593ad32c16 34 minutes ago 43.1MB
dselen@N-DESKTOP1:~/development/act_runner$ docker run -d -e TZ=Europe/Amsterdam runner:non-edit
5f26979515f461a2a7e342aa586d7b91224d2d3c3dcf1ed0c1e7293ff00645a4
dselen@N-DESKTOP1:~/development/act_runner$ docker run -d -e TZ=Europe/Amsterdam runner:edit
9cc5fc6b364cf07776d97c6c60c03f23372eb2c93c7da8d3d80f4f6dc2a6b10e
dselen@N-DESKTOP1:~/development/act_runner$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9cc5fc6b364c runner:edit "/sbin/tini -- run.sh" 2 seconds ago Up 2 seconds serene_bardeen
5f26979515f4 runner:non-edit "/sbin/tini -- run.sh" 5 seconds ago Up 5 seconds jovial_euler
dselen@N-DESKTOP1:~/development/act_runner$ docker exec -it jovial_euler bash
5f26979515f4:/# date
Thu Aug 21 16:40:35 UTC 2025
dselen@N-DESKTOP1:~/development/act_runner$ docker exec -it serene_bardeen bash
9cc5fc6b364c:/# date
Thu Aug 21 18:40:42 CEST 2025
```
I do not see why this would not be acceptable, its only 400KB
Regards.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/738
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Co-authored-by: DaanSelen <daanselen@noreply.gitea.com >
Co-committed-by: DaanSelen <daanselen@noreply.gitea.com >
2025-08-21 23:56:32 +00:00
Christopher Homberger
6a7e18b124
Allow node24 actions ( #737 )
...
* `node` Tool is used regardless of this change
* upgrade images with `node` = `node24` if required
* actions/checkout@v5 now passing validation
Fixes #729
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/737
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-08-21 17:47:26 +00:00
Christopher Homberger
91852faf93
refactor: simplify adding new node versions add node 24 ( #140 )
...
* backport
Reviewed-on: https://gitea.com/gitea/act/pulls/140
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-08-21 16:04:08 +00:00
ChristopherHX
39509e9ad0
Support Simplified Concurrency ( #139 )
...
- update RawConcurrency struct to parse and serialize string-based concurrency notation
- update EvaluateConcurrency to handle new RawConcurrency format
Reviewed-on: https://gitea.com/gitea/act/pulls/139
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: ChristopherHX <christopher.homberger@web.de >
Co-committed-by: ChristopherHX <christopher.homberger@web.de >
2025-07-29 09:14:47 +00:00
telackey
53329c46ff
Add ubuntu-24.04 label to defaults. ( #724 )
...
Simple change to include ubuntu-24.04 in the default list. While ubuntu-latest already points to the same image (at this time) it is appropriate to have it by version as well.
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/724
Co-authored-by: telackey <telackey@noreply.gitea.com >
Co-committed-by: telackey <telackey@noreply.gitea.com >
2025-07-22 14:47:30 +00:00
Lunny Xiao
6b1aea9c04
Upgrade github.com/go-git/go-git/v5 to v5.16.2 ( #706 )
...
Fix #695
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/706
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
v0.2.12
2025-06-11 17:59:35 +00:00
lautriva
edec9a8f91
Add a way to specify vars in act_runner exec ( #704 )
...
Before this commit, when running locally `act_runner exec` to test workflows, we could only fill env and secrets but not vars
This commit add a new exec option `--var` based on what is done for env and secret
Example:
`act_runner exec --env MY_ENV=testenv -s MY_SECRET=testsecret --var MY_VAR=testvariable`
workflow
```
name: Gitea Actions test
on: [push]
jobs:
TestAction:
runs-on: ubuntu-latest
steps:
- run: echo "VAR -> ${{ vars.MY_VAR }}"
- run: echo "ENV -> ${{ env.MY_ENV }}"
- run: echo "SECRET -> ${{ secrets.MY_SECRET }}"
```
Will echo var, env and secret values sent in the command line
Fixes gitea/act_runner#692
Co-authored-by: Lautriva <gitlactr@dbn.re >
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/704
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: lautriva <lautriva@noreply.gitea.com >
Co-committed-by: lautriva <lautriva@noreply.gitea.com >
2025-06-11 17:38:29 +00:00
Pablo Carranza
6a9a447f86
Report errors by setting raw_output when it's error level ( #645 )
...
This solves #643 by setting the "raw_output" entry attribute when the log level is error. This results in the log line being shipped to the Gitea UI.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/645
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com >
Co-authored-by: Pablo Carranza <pcarranza@gmail.com >
Co-committed-by: Pablo Carranza <pcarranza@gmail.com >
2025-06-05 17:53:13 +00:00
badhezi
9924aea786
Evaluate run-name field for workflows ( #137 )
...
To support https://github.com/go-gitea/gitea/pull/34301
Reviewed-on: https://gitea.com/gitea/act/pulls/137
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: badhezi <zlilaharon@gmail.com >
Co-committed-by: badhezi <zlilaharon@gmail.com >
2025-05-12 17:17:50 +00:00
Jack Jackson
5302c25feb
Add environment variables for OIDC token service ( #674 )
...
Resurrecting [this PR](https://gitea.com/gitea/act_runner/pulls/272 ) (a dependency of [this one](https://github.com/go-gitea/gitea/pull/33945 )) after the original author [lost motivation](https://github.com/go-gitea/gitea/pull/25664#issuecomment-2737099259 ) - though, to be clear, all credit belongs to them, and all blame for mistakes or misunderstandings to me.
Co-authored-by: Søren L. Hansen <sorenisanerd@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/674
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jack Jackson <scubbojj@gmail.com >
Co-committed-by: Jack Jackson <scubbojj@gmail.com >
2025-05-08 01:58:31 +00:00
Christopher Homberger
a616ed1a10
feat: register interactive with values from cli ( #682 )
...
I used to be able to do something like `./act_runner register --instance https://gitea.com --token testdcff --name test` on GitHub Actions Runners, but act_runner always asked me to enter instance, token etc. again and requiring me to use `--no-interactive` including passing everything per cli.
My idea was to extract the preset input of some stages to skip the prompt for this value if it is a non empty string. Labels is the only question that has been asked more than once if validation failed, in this case the error path have to unset the values of the input structure to not end in a non-interactive loop.
_I have written this initially for my own gitea runner, might be useful to everyone using the official runner as well_
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/682
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-05-08 01:57:53 +00:00
Christopher Homberger
f0b5aff3bb
fix: invalid label NoInteractive exit code ( #683 )
...
* add test
* return validation error not nil from function
Closes #665
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/683
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-05-07 17:17:26 +00:00
Christopher Homberger
44b4736703
feat: docker env vars for ephemeral and once ( #685 )
...
* GITEA_RUNNER_EPHEMERAL=1
* GITEA_RUNNER_ONCE=1
Related https://gitea.com/gitea/act_runner/issues/684
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/685
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-05-07 15:43:05 +00:00
Jack Jackson
65c232c4a5
Parse permissions ( #133 )
...
Resurrecting [this PR](https://gitea.com/gitea/act/pulls/73 ) as the original author has [lost motivation](https://github.com/go-gitea/gitea/pull/25664#issuecomment-2737099259 ) (though, to be clear - all credit belongs to them, all mistakes are mine and mine alone!)
Co-authored-by: Søren L. Hansen <sorenisanerd@gmail.com >
Reviewed-on: https://gitea.com/gitea/act/pulls/133
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Jack Jackson <scubbojj@gmail.com >
Co-committed-by: Jack Jackson <scubbojj@gmail.com >
2025-03-24 18:17:06 +00:00
Christopher Homberger
b1ae30dda8
ephemeral act runner ( #649 )
...
Works for both interactive and non-interactive registration mode.
A further enhancement would be jitconfig support of the daemon command, because after some changes in Gitea Actions the registration token became reusable.
removing runner and fail seems not possible at the current api level
Part of https://github.com/go-gitea/gitea/pull/33570
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/649
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com >
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Christopher Homberger <christopher.homberger@web.de >
Co-committed-by: Christopher Homberger <christopher.homberger@web.de >
2025-03-13 21:57:44 +00:00
techknowlogick
0d687268c7
act_runner requires go 1.24 now
2025-03-02 05:36:24 +00:00
techknowlogick
425a570261
use new docker image URLs ( #661 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/661
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
Co-committed-by: techknowlogick <techknowlogick@gitea.com >
2025-03-01 20:21:52 +00:00
Lunny Xiao
4c8179ee12
upgrade to go1.24, act to 0.261.4 and actions-proto-go to 0.4.1 ( #662 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/662
Reviewed-by: ChristopherHX <christopherhx@noreply.gitea.com >
2025-03-01 20:18:36 +00:00
Guillaume S.
5da4954b65
fix handle missing yaml.ScalarNode ( #129 )
...
This bug was reported on https://github.com/go-gitea/gitea/issues/33657
Rewrite of (see below) was missing in this commit 6cdf1e5788
```go
case string:
acts[act] = []string{b}
```
Reviewed-on: https://gitea.com/gitea/act/pulls/129
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Co-authored-by: Guillaume S. <me@gsvd.dev >
Co-committed-by: Guillaume S. <me@gsvd.dev >
2025-02-26 06:19:02 +00:00
Pablo Carranza
5ae13f0bd7
Update xgo version to 1.24 ( #651 )
...
Co-authored-by: techknowlogick <techknowlogick@gitea.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/651
Co-authored-by: Pablo Carranza <pcarranza@gmail.com >
Co-committed-by: Pablo Carranza <pcarranza@gmail.com >
2025-02-15 16:07:18 +00:00
Zettat123
ec091ad269
Support concurrency ( #124 )
...
To support `concurrency` syntax for Gitea Actions
Gitea PR: https://github.com/go-gitea/gitea/pull/32751
Reviewed-on: https://gitea.com/gitea/act/pulls/124
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-02-11 02:51:48 +00:00
Lunny Xiao
3510152e36
Fix Makefile make docker ( #641 )
...
Fix #640
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/641
2025-01-29 03:27:47 +00:00
armistace
8dfb805c62
Update examples/kubernetes/dind-docker.yaml to reflect recent changes to Dockerfile ( #633 )
...
With the changes made two months ago for the Dockerfile /opt/act/run.sh no longer exists in the docker container, this caused this example to fail, updating the example so that it correctly references run.sh now located in /usr/local/bin
I have used this to deploy on my own cluster and it is now working swimmingly
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/633
Reviewed-by: Zettat123 <zettat123@noreply.gitea.com >
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: armistace <armistace@noreply.gitea.com >
Co-committed-by: armistace <armistace@noreply.gitea.com >
2025-01-26 02:10:17 +00:00
Zettat123
a7080f5457
Update examples for GITEA_RUNNER_REGISTRATION_TOKEN env ( #630 )
...
For https://github.com/go-gitea/gitea/pull/32946
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/630
Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com >
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2025-01-05 22:25:32 +00:00
techknowlogick
8b72d1c7ae
add s390x and riscv64 as an arch for binaries
2024-12-09 18:49:38 +00:00
Zettat123
1656206765
Improve the support for reusable workflows ( #122 )
...
Fix [#32439 ](https://github.com/go-gitea/gitea/issues/32439 )
- Support reusable workflows with conditional jobs
- Support nesting reusable workflows
Reviewed-on: https://gitea.com/gitea/act/pulls/122
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com >
Reviewed-by: Jason Song <wolfogre@noreply.gitea.com >
Co-authored-by: Zettat123 <zettat123@gmail.com >
Co-committed-by: Zettat123 <zettat123@gmail.com >
2024-11-23 14:14:17 +00:00
garet90
8bc0275e74
feat: add once flag to daemon command ( #19 ) ( #598 )
...
Once flag polls and completes one job then exits.
I use this with Windows Sandbox (and creating users with local brew install on Mac) to create a fresh environment every time.
Co-authored-by: Garet Halliday <garet@pit.dev >
Co-authored-by: Jason Song <wolfogre@noreply.gitea.com >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/598
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com >
Reviewed-by: Jason Song <wolfogre@noreply.gitea.com >
Co-authored-by: garet90 <garet90@noreply.gitea.com >
Co-committed-by: garet90 <garet90@noreply.gitea.com >
2024-11-06 17:16:08 +00:00