1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00
Commit graph

855 commits

Author SHA1 Message Date
Michael Kriese
1082b31367 fix: partial secure cache 2025-03-21 13:45:51 +00:00
earl-warren
ea79e3de41 Merge pull request 'fix: ensure the LXC template does not have obsolete APT' (#102) from earl-warren/act:wip-apt-old into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/102
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-29 10:02:37 +00:00
Earl Warren
4df32aa3df fix: ensure the LXC template does not have obsolete APT
Upgrade to lxc-helper 1.0.1
2025-01-29 10:30:14 +01:00
Earl Warren
50aec4962b chore(upgrade): sync lxc-helpers v1.0.3 2025-01-29 10:30:12 +01:00
Michael Kriese
54fead51c6 fix(jobparser): support workflow_call.inputs and workflow_call.outputs (#70)
- Closes #69
- #45
- https://codeberg.org/forgejo/forgejo/issues/6069

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/70
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-committed-by: Michael Kriese <michael.kriese@visualon.de>
2025-01-29 08:38:30 +00:00
earl-warren
0e99df94b7 Merge pull request 'fix(tests): binds are not sorted' (#97) from earl-warren/act:wip-test into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/97
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-23 16:45:52 +00:00
Earl Warren
e0facd1ee5 fix(tests): binds are not sorted
That creates false negative in test runs. Just keep one, there is no
value in having more.
2025-01-22 22:24:27 +01:00
Earl Warren
d92e4a8aff feat: --hostname is allowed in container options (#95)
It is useful to set an alternative hostname when running a service
such as:

```yaml
services:
  minio:
    image: data.forgejo.org/oci/bitnami/minio:2024.8.17
    options: >-
      --hostname alternate.minio
```

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/95
Reviewed-by: Kwonunn <kwonunn@noreply.code.forgejo.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-01-22 18:22:29 +00:00
earl-warren
a8bfb47292 Merge pull request 'fix: do not ignore the config container.options when starting a job' (#92) from earl-warren/act:wip-mount into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/92
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-11 11:01:26 +00:00
Earl Warren
790d1776e7 fix: do not ignore the config container.options when starting a job 2025-01-11 08:45:08 +01:00
Earl Warren
ed911869e1 fix: filter job container options with an allow list
The workflow can only contain the following options for a container:

- --volume
- --tmpfs
2025-01-09 12:10:21 +01:00
Earl Warren
1a77a34726 chore(refactor): split parseOptions out of mergeContainerConfigs 2025-01-09 12:10:21 +01:00
Earl Warren
fc518884f9 chore(refactor): split Options into ConfigOptions & JobOptions
They are both command line options to be parsed as if provided to
docker-run, but they are not to be trusted in the same way.
2025-01-09 12:10:21 +01:00
earl-warren
b03a6b9004 Merge pull request 'feat: Improve logging of error messages' (#90) from vpotyarkin/act:feature/improve-error-logging into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/90
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2025-01-09 10:29:17 +00:00
Vitaliy Potyarkin
591770bf63 refactor: Improve logging of error messages
Logging bare errors might lead to long troubleshooting sessions when error
is not specific enough. This commit adds helpful context messages to
logged errors.

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2025-01-09 12:36:30 +03:00
earl-warren
84eca8312d Merge pull request 'feat: export runtime token as FORGEJO_TOKEN' (#88) from xtex/act:forgejo-token-env into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/88
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-01-05 11:28:57 +00:00
xtex
606d8701ed feat: export runtime token as FORGEJO_TOKEN 2025-01-04 20:01:43 +08:00
earl-warren
cf74c364fb Merge pull request 'chore(lint): fix lint errors' (#84) from earl-warren/act:wip-lint into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/84
2025-01-02 08:50:27 +00:00
Earl Warren
58966f5a8a chore(lint): fix lint errors
- upgrade to golangci-lint@v1.62.2
- make it renovate friendly
- remove most frequent lint check that are not of consequence (unused
  args, etc.)
- fix remaining lint errors
- add renovate custom manager to update the Makefile variable
2024-12-30 21:11:02 +00:00
earl-warren
dc354827a3 Merge pull request 'fix: Do not fail on nil error' (#87) from vpotyarkin/act:fix/nil-error into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/87
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-28 08:02:23 +00:00
Vitaliy Potyarkin
324188e239 fix: Do not fail on nil error
Commit 5a351d33df has introduced a
regression due to which copyDir() would fail after closing the archive
successfully

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-12-27 17:56:23 +03:00
earl-warren
c3adea9750 Merge pull request 'chore(tests): add ./pkg/container tests' (#86) from earl-warren/act:wip-container-tests into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/86
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-12-27 11:45:42 +00:00
Earl Warren
07c56a4032 chore(tests): add ./pkg/container tests
remove a failed test verifying exposed port which are not used in the
Forgejo runner anyway
2024-12-27 11:59:35 +01:00
earl-warren
594fd4ffa3 Merge pull request 'fix(cache-server): use consistent uint64' (#68) from fix/cache/use-uint64 into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/68
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-11-22 06:57:18 +00:00
Michael Kriese
d8376ed890 fix(cache-server): use consistent uint64 2024-11-22 01:01:12 +01:00
earl-warren
d89433fe3d Merge pull request 'fix: log skipped job and step result as info instead of debug' (#67) from earl-warren/act:wip-runner-test into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/67
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-11-21 13:25:45 +00:00
Earl Warren
ef243fbf2f fix: log skipped job and step result as info instead of debug
This allows the Forgejo runner to obtain the job result from the
logs even when it is not in debug mode.
2024-11-21 12:18:04 +00:00
Earl Warren
c42fa5f412 fix: [FORGEJO] do not share the act-toolcache volume
In the context of Forgejo the act-toolcache must not be mounted
otherwise independent workflows will race against each other when
writing to it. For instance if a setup-go action is run at the same
time as another, there is a probability that they both write the same
file at the same time, which could lead to a truncated or invalid
content.
2024-11-20 09:42:15 +00:00
earl-warren
3b289cfc24 Merge pull request 'Support overwriting caches' (#60) from wip-artifactcache into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/60
2024-11-11 16:43:23 +00:00
ChristopherHX
017db5edae fix: cache adjust restore order of exact key matches (#2267)
* wip: adjust restore order

* fixup

* add tests

* cleanup

* fix typo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 88ac88c5413a430b41d767a942c8e70e778e1d61)
2024-11-07 16:25:40 +01:00
Jason Song
b0c54edc78 Support overwriting caches (#2265)
* feat: support overwrite caches

* test: fix case

* test: fix get_with_multiple_keys

* chore: use atomic.Bool

* test: improve get_with_multiple_keys

* chore: use ping to improve path

* fix: wrong CompareAndSwap

* test: TestHandler_gcCache

* chore: lint code

* chore: lint code

(cherry picked from commit 087b28afc56351b93dd68d7e59a2c8740f6c0e44)
2024-11-07 16:25:26 +01:00
ChristopherHX
4b2554db86 fix: docker buildx cache restore not working (#2236)
* To take effect artifacts v4 pr is needed with adjusted claims

(cherry picked from commit c606759e8c0c2d5036c5bb15d7ec87beca1150cf)
2024-11-07 16:25:15 +01:00
earl-warren
d4566ea157 Merge pull request 'fix: return an error when the argument count is wrong' (#59) from earl-warren/act:wip-arg-count into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/59
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-31 15:34:31 +00:00
Earl Warren
4b5c96dc22 fix: return an error when the argument count is wrong
Closes forgejo/runner#307
2024-10-31 16:02:17 +01:00
earl-warren
672c6a9ded Merge pull request 'fix: debug is leaking host container and network names' (#58) from earl-warren/act:wip-debug into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/58
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-10-19 08:07:19 +00:00
Earl Warren
d544eb76a8 fix: debug is leaking host container and network names
Closes forgejo/runner#295
2024-10-19 08:48:50 +02:00
earl-warren
febc7a49b6 Merge pull request '[FORGEJO] when a workflow decode error happen, log and do not crash' (#54) from earl-warren/act:wip-decode-fatal into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/54
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-09-15 16:35:43 +00:00
Earl Warren
61b7859f12 [FORGEJO] when a workflow decode error happen, log and do not crash 2024-09-15 15:46:01 +02:00
Michael Kriese
81c1530fce Merge pull request 'chore: drop .github and .gitea' (#50) from chore/drop-github-and-gitea into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/50
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-08-23 09:20:18 +00:00
Michael Kriese
ec38ef216e chore: drop .github and .gitea 2024-08-23 11:19:57 +02:00
earl-warren
5e7adf690c Merge pull request 'fix(jobparser): support workflow_dispatch.inputs' (#45) from viceice/fix-inputs into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/45
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-08-22 14:10:57 +00:00
Michael Kriese
5304d71a96 fix(jobparser): support workflow_dispatch.inputs 2024-08-22 15:02:05 +02:00
thefox
a2e7fca1ba Merge pull request 'fix(jobparser): template job name if it's defined' (#41) from thefox/job-matrix into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/41
2024-07-01 19:49:30 +00:00
TheFox0x7
ae5411b096 fix(jobparser): template job name if it's defined 2024-07-01 20:23:17 +02:00
earl-warren
0f8ceee2cd Merge pull request 'Fix NewDockerNetworkCreateExecutor in docker_stub' (#39) from tmb/act:fix-docker_stub into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/39
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
2024-04-04 08:07:16 +00:00
Tobias Bölz
6657ce2520 Fix NewDockerNetworkCreateExecutor in docker_stub 2024-04-03 13:55:42 +02:00
TheFox0x7
2ca53dd660 [FORGEJO] add forge alias for github (#37)
I left gitea for backwards compatibility

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/37
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
2024-04-02 18:23:26 +00:00
earl-warren
03802d2f7d Merge pull request '[FORGEJO] a network of "" is not the same as "host"' (#35) from earl-warren/act:wip-network into main
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/35
Reviewed-by: twenty-panda <twenty-panda@noreply.code.forgejo.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2024-03-24 11:58:34 +00:00
Earl Warren
eb76c80193 [FORGEJO] a network of "" is not the same as "host"
The comment that introduced this change suggests it was motivated by a
border case by which the image would be empty. It is however unclear
why it should have any impact on how the network name is determined.

The hunk is reverted.

https://github.com/nektos/act/pull/1949/files#r1315163582
2024-03-24 12:09:40 +01:00
Earl Warren
18b78d6299 [FORGEJO] Revert "Don't set GITHUB_TOKEN (#2089)"
It is a breaking change.

This reverts commit d2b2ed2d66.
2024-03-11 17:46:38 +07:00