The exec --artifact-server-* options are removed. It is required to run a workflow from within a Forgejo server to upload and download artifacts.
It is assumed to be rarely (if at all) used and supporting it in any meaningful way would require a duplication of effort.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/740
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
So that it can be used as a package. Not useful right away, but a precondition to merge the ACT repository into the runner repository.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/747
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
Otherwise the indentation does not show correctly.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/741
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
testutils.MockVariable must be in a defer to restore the previous value.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/701
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
- report back to the Forgejo instance
- log Forgejo runner side in debug mode
- display the workflow with line number to facilitate matching with errors
- split the error into multiple lines if possible

Refs forgejo/act#170
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/666
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
So it does not panic if one is nil.
Closesforgejo/runner#146
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/684
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
go test -cover -coverprofile coverage.txt -v ./internal/pkg/report/...
go tool cover -html=coverage.txt -o coverage.html
xdg-open coverage.html
$ go run github.com/gregoryv/uncover/cmd/uncover@latest coverage.txt ReportLog
total: (statements) 100.0%
- do not try to mask a secret when a log line is received
- try to mask secrets before before sending a batch of log
lines to the Forgejo instance (every second)
- if masking a multiline secret needs more log lines to decide
if it needs to be masked, do not attempt to send anything to
the Forgejo instance, just wait until there are more log lines
Closesforgejo/runner#57
r.logOffset = ack
ack < r.logOffset+len(rows)
can be simplified as
len(rows) > 0
which is only false if there were no rows to send. It follows
that
if noMore && ack < r.logOffset+len(rows) {
is can be simplified as
if noMore {
is always true if rows were sent.
The intent was apparently to return on error and retry if only
part of the rows were sent but not all of them. To achieve that
the expression is replaced with:
if noMore && len(r.logRows) > 0 {
- the longest secret is masked first
- multiline secrets are masked before single line secrets
- O(multiline * log rows) to not degrade performances when there are
no multiline secrets
and it is kind of useless anyway because invalid workflows are currently failing in very inconsistent and unpredictable ways.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/664
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
the context sent from the Forgejo instance is expected to have
gitea_default_actions_url
gitea_runtime_token
add support for
forgejo_default_actions_url
forgejo_runtime_token
as well so that future Forgejo versions can make the change.
--add-host name not work depending on the network mode chosen.
Closesforgejo/runner#213
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/630
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
Hi!
~~ba2fc1273ce5cb04d96cfdbb47ebad929dcbd96f goes in tandem with https://code.forgejo.org/forgejo/act/pulls/135 and adapts to the API changes for `runner.Config.`~~
I dropped the act interface changes according to https://code.forgejo.org/forgejo/act/pulls/135#issuecomment-40695, but kept the CLI changes here - as they are not breaking here.
Other three commits just fix up some typos around the tree - bit of a pet peeve of mine, sorry :^)
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/576
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Christoph Heiss <christoph@c8h4.io>
Co-committed-by: Christoph Heiss <christoph@c8h4.io>
- Forgejo (since v8, 38ea77ebbe) does not use the value of this header, it was [introduced in v1.20](371520d7ab).
- Older forgejo version than v8 handle it gracefully if this value is not sent.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/496
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
This is the forgejo-runner-side patch for a partial overhaul of the cache system to fix some access control issues with caches.
This code depends on changes in act which are being reviewed here: forgejo/act#107
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/502
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/503
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Co-authored-by: Kwonunn <kwonunnx@gmail.com>
Co-committed-by: Kwonunn <kwonunnx@gmail.com>
As commented here https://code.forgejo.org/forgejo/runner/issues/422, this PR aims to allow a new type of one shot execution compatible with autoscaling features and other job types.
Co-authored-by: jaime merino <jaime.merino_mora@mail.schwarzª>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/423
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: cobak78 <cobak78@noreply.code.forgejo.org>
Co-committed-by: cobak78 <cobak78@noreply.code.forgejo.org>
From: 1735b26e66
Don't log job output when debug logging is not enabled
We wanted the ability to disable outputting the logs from the individual job to the console. This changes the logging so that job logs are only output to the console whenever debug logging is enabled in `act_runner`, while still allowing the `Reporter` to receive these logs and forward them to Gitea when debug logging is not enabled.
Signed-off-by: Kwonunn <kwonunnx@gmail.com>
bufbuild/connect-go was archived with maintenance transferred to the
ConnectRPC organization. Gitea's protobuf library for actions now uses
the ConnectRPC dependency as of v0.4.0, removing the need to continue
using the dead package.