Commit Graph

571 Commits

Author SHA1 Message Date
silverwind
4fdf9ab904 Fix executor_test.go: ErrorIs arg order, wrong target, and data races
- TestNewParallelExecutorFailed: fix assert.ErrorIs argument order
- TestNewParallelExecutorCanceled: check for context.Canceled (not the
  executor error) since NewParallelExecutor returns ctx.Err() when
  context is cancelled; use atomic counter to fix data race
- TestNewParallelExecutor: use atomic counters to fix data race with
  concurrent goroutines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:06:05 +01:00
Christopher Homberger
c192d65d18 exclude act pkg from vet 2026-02-23 23:33:02 +01:00
Christopher Homberger
b53c54f73d fix last error 2026-02-23 14:09:30 +01:00
silverwind
1670945af3 Fix all 93 lint-go errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 13:59:05 +01:00
Christopher Homberger
09d18916bf more lint errors 2026-02-23 00:30:44 +01:00
Christopher Homberger
bffc600775 fixes 2026-02-22 21:12:25 +01:00
Christopher Homberger
a27473e6a8 fixes 2026-02-22 21:04:33 +01:00
Christopher Homberger
a77f10683d assert => require 2026-02-22 21:00:42 +01:00
Christopher Homberger
d187ac2fc1 auto adjust code 2026-02-22 20:58:46 +01:00
Christopher Homberger
949a40c7a5 Merge https://gitea.com/actions-oss/act-cli into act-runner-merged 2026-02-22 20:56:21 +01:00
Christopher Homberger
3413919161 update import path 2026-02-22 20:54:58 +01:00
Christopher Homberger
40ee0f3ef6 feat: add act runner compat code (#35)
* attempt to build an act_runner using this implementation of act with minimal changes on act side.

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/35
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2026-02-20 20:06:04 +00:00
Christopher Homberger
933c4a5bd5 feat: allow configuring gitea schema mode (#23)
* config entries for schema change
* remove broken/unused syntetic nodejs action
* specify desired schema in model struct that is read by unmarshal
* replace params by config
* allows gitea context + env names
* act --gitea now parses a subset of gitea specific workflows

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/23
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2026-02-14 16:23:59 +00:00
Christopher Homberger
8505f73fe4 fix: fallback of localRepository cache being nil (#29)
Doing `act --local-repository test/self-ref@main=/folder-path/self-ref` caused a null pointer exception while fetching a non mapped entry, due to missing remote fallback.

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/29
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2026-02-06 11:11:34 +00:00
Christopher Homberger
6c827eba95 fix: anchor cyclic detection (#30)
Closes #25

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/30
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2026-02-02 20:43:49 +00:00
Christopher Homberger
0cdc6fd88b test: missing shell property in composite action (#20)
Make sure we report schema errors consistently

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/20
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-12-19 16:25:23 +00:00
ChristopherHX
ce0890578a refactor: move getContainerActionPaths into step interface (#13)
* allows to specialize local vs remote action implementation
* allow paths like ./.. for local action

Closes https://gitea.com/actions-oss/act-cli/issues/12

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/13
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
2025-12-19 16:24:48 +00:00
ChristopherHX
ee2e0135d5 feat: implement case function (#16)
Follow GitHub Actions

* added unit tests

Closes #15

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/16
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
Co-committed-by: ChristopherHX <christopher.homberger@web.de>
2025-12-18 19:27:30 +00:00
Christopher Homberger
83cbf1f2b8 Port CI to Gitea.com (#1)
# Problems
- [x] Some env variables from act itself / act_runner let the tests fail.
- [ ] CI takes too long to clone actions, need to speed up the used act_runner by sparse checkout
    - Runners are reused this speeds up once every runner has ran every job
- [ ] Qemu setup is broken and do not add all platforms like GitHub CI expected`  linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/loong64,linux/arm/v7,linux/arm/v6` got `linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4,linux/386` without qemu set up
  - Test Disabled
- [x] ACTIONS_RUNTIME_TOKEN needs to be unset
- [ ] Snapshot needs our version of the npm package / patching
  - Test Disabled
- [ ] ACTIONS_RESULTS_URL:http://127.0.0.1:12345/ seems to be a fallback to localhost this is a problem
  - Test Disabled

Reviewed-on: https://gitea.com/actions-oss/act-cli/pulls/1
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Co-committed-by: Christopher Homberger <christopher.homberger@web.de>
2025-11-27 14:57:23 +00:00
ChristopherHX
82dccc7820 Replace expressions engine (#133) 2025-10-06 13:53:15 +02:00
ChristopherHX
9c2f3e9f70 Fix self referencing anchors should cause error (#132) 2025-09-27 00:04:03 +02:00
ChristopherHX
79360e4ed1 fix: explode yaml anchors (#126)
* do not require code changes at several places
2025-09-13 15:46:46 +02:00
ChristopherHX
cd57d482c3 support yaml anchors (#65) 2025-08-04 16:57:51 +02:00
ChristopherHX
42ec8a5ab5 fix: Allow almost all node<number> variants in actions.runs (#120) 2025-07-24 23:33:11 +02:00
ChristopherHX
aeb7c01c61 Bump Test image to bookworm (#121)
* buster is end of life since 2024
2025-07-24 23:25:36 +02:00
ChristopherHX
4c7216f69b fix: matrix expansion logic (#115)
* add another test

* remove //nolint:gocyclo
2025-06-08 13:23:33 +02:00
ChristopherHX
3293d725a7 feat: add parallel flag (#114)
* add parallel flag
2025-06-08 12:41:42 +02:00
ChristopherHX
f36df5592d feat: CustomExecutor Provide Custom Job Runner Implementation (#113) 2025-06-08 11:41:38 +02:00
ChristopherHX
d5a1a09aa4 fix: GITHUB_ENV and GITHUB_OUTPUT allow larger lines (#112)
* Specify larger buffer
2025-06-03 22:59:05 +02:00
ChristopherHX
e6ba3086c3 chore(deps): Migrate docker api usage (#110)
* do not use deprecated types / functions
2025-06-01 13:53:07 +00:00
ChristopherHX
5ca0d3cb71 chore(deps): Update Workflow Schema (#107)
* add ai permission
* add workflow description
2025-05-21 10:02:35 +00:00
ChristopherHX
b634fba677 feat: contextdata overlay api and more gh/gt instance flags (#105)
* add TestGetGitHubContextOverlay
2025-05-18 13:44:33 +02:00
ChristopherHX
6440a419d2 fix: stability of docker cancel test (#106) 2025-05-18 13:24:33 +02:00
ChristopherHX
1dc7a4d269 feat: allow ctx overlay + case sensitive env ctx (#99)
* switch to fork of actionlint
2025-05-18 11:35:05 +02:00
ChristopherHX
bb140f1a38 feat: log parsed command data in json logger (#103)
* feat: log parsed command data in json logger

* add logging info to other commands as well
2025-05-17 16:14:53 +02:00
ChristopherHX
268a69b6d1 fix: use moby/go-archive due to deprecation (#102) 2025-05-03 11:12:48 +02:00
ChristopherHX
bb13ab4f84 feat: cache module add CreateHandler api (#98) 2025-04-26 16:58:30 +02:00
ChristopherHX
258de0fa37 fix: container cleanup error is not a job execution error (#97) 2025-04-26 16:41:04 +02:00
ChristopherHX
8536279ece feat: service container in host mode (#95) 2025-04-26 14:28:53 +00:00
ChristopherHX
a3c8116dee fix: step container workdir and mounts (#93)
* fix: step container workdir and mounts
* avoid perm issues and do not mount tool_cache
2025-04-26 14:14:52 +02:00
ChristopherHX
eddc77f3e0 refactor: migrate container changes (#91)
* refactor: migrate container changes
* ignore contextcheck
2025-04-26 13:28:18 +02:00
ChristopherHX
dfbb094199 feat: custom host env dir for api (#92) 2025-04-26 12:55:45 +02:00
ChristopherHX
0aca9b8144 fix: post step failure is job failure (#85) 2025-04-25 22:32:55 +00:00
ChristopherHX
f2550c1971 fix: file name (#90) 2025-04-25 22:47:02 +02:00
ChristopherHX
fba76f10dd core(deps): bump golang-cilint to v2.0.2 (#83) 2025-04-25 21:58:30 +02:00
ChristopherHX
4be22e9b76 fix: use the happy path for workflow_call (#88)
* not really supported mode
2025-04-25 19:56:07 +02:00
ChristopherHX
a1935498a7 fix: tart backend stops VM to early (#76) 2025-03-29 13:39:47 +01:00
ChristopherHX
cef5575fa4 feat: Support graceful job step cancellation (#69)
* for gh-act-runner
* act-cli support as well
* respecting always() and cancelled() of steps
* setup-job, bug report, gh cli and watch wait call is cancelled early
2025-03-29 12:27:36 +01:00
ChristopherHX
95ba59f608 feat: --validate and --strict (#71)
* feat: `--validate` and `--strict`

* add test for strict validate
2025-03-28 22:56:20 +01:00
ChristopherHX
b46fe4265e fix: reporting fetch failure as job error and log the error (#70)
E.g. if GoGitAction Cache had a fetch failure this error did not trigger report jobResult Failure.

Also the error has been not printed until the last message before exit of act.

* adds tests for both corner cases
2025-03-28 00:17:07 +01:00