In testing of 5 popular action repos, this change uses 100x less disk space for the actions repo cache and makes initial repo cloning 12x faster. It does this by only fetching 1 commit and 0-1 refs from the remote whereas current `main` code unconditionally fetches all refs including tags, branches and the full commit history associated with each ref and any other reachable objects.
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1722
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
All LXC and host-based commands were being unconditionally run with a pty attached. As Forgejo Action's log viewer is not a terminal emulator, and it is not capable of supporting most terminal control output, this PR removes that implementation choice. This brings consistency with docker-based execution, where the container may optionally be connected to a tty, but the command execution is not (when using `daemon` mode).
The accurate state to describe Forgejo Runner's output is that it is not a terminal, but that it does support a subset of ANSI codes such as colour selection (FG & BG), bold, faint, italic, underline, and hyperlinks. Unfortunately there is no way to communicate that subset to a program in a standardized way -- setting a tty is sometimes used as a signal for such, but it's a near-miss in communicating that intent.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1692): <!--number 1692 --><!--line 0 --><!--description Zml4OiBkb24ndCBydW4gaG9zdC1iYXNlZCBleGVjdXRvciAmIExYQyBleGVjdXRvciBzdWJjb21tYW5kcyBpbiBhIFRUWQ==-->fix: don't run host-based executor & LXC executor subcommands in a TTY<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1692
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Prevent the usage of `git replace` to create a ref that shadows another commit, similar to previous fixes for tags and branches.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1635): <!--number 1635 --><!--line 0 --><!--description Zml4OiBwcmV2ZW50IGNvbW1pdCBpbXBlcnNvbmF0aW9uIHZpYSBgcmVmcy9yZXBsYWNlLypgIGR1cmluZyBhY3Rpb24gY2hlY2tvdXQ=-->fix: prevent commit impersonation via `refs/replace/*` during action checkout<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1635
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
git subprocesses which the runner spawns were not being placed into a process group, and were not being terminated in a process group, in the event that a job's context was cancelled. This could allow git subprocesses to be left as zombies when git was cancelled by the runner.
This PR fixes the git subprocess management to use the same cross-platform system developed for the host-based executor.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1623): <!--number 1623 --><!--line 0 --><!--description Zml4OiBydW4gZ2l0IHN1YnByb2Nlc3NlcyBpbiBhIHByb2Nlc3MgZ3JvdXA=-->fix: run git subprocesses in a process group<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1623
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
https://code.forgejo.org/forgejo/runner/pulls/1585 introduced the environment variable `TEST_FEATURES` for switching tests related to particular feature on and off. For example, with `TEST_FEATURES=""`, tests that require Docker would be skipped. Unfortunately, that technique has multiple problems. Environment variables might not be passed on to child processes without it being clearly visible. Also, the usage differs by platform. On top of that, informational messages that are only related to testing were printed by the release binary.
Instead of the environment variable `TEST_FEATURES`, the command line flag `-features` is introduced:
```
$ go test ./... -args -features "docker,lxc"
```
That runs all tests that require the presence of Docker and LXC. It is also the default.
If tests that require Docker should be skipped, run:
```
$ go test ./... -args -features "lxc"
```
To exclude all tests that require the presence of a particular feature, run:
```
$ go test ./... -args -features "-"
```
At the moment, `-features` cannot be controlled when using make targets. That means that `make integration-test` runs all tests that require Docker or LXC.
Supersedes https://code.forgejo.org/forgejo/runner/pulls/1588.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1591): <!--number 1591 --><!--line 0 --><!--description dGVzdDogdXNlIGZsYWdzIGluc3RlYWQgb2YgZW52IHZhcmlhYmxlcyBmb3Igc2tpcHBpbmcgdGVzdHM=-->test: use flags instead of env variables for skipping tests<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1591
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Adds two tests that verify the Runner's action checkout operations are not affected negatively by branches or tags that look exactly like commit IDs:
- "Shadowing" an existing commit by adding a tag with the commit ID as the name, redirecting to another commit.
- Removing the original commit and adding a tag with the commit ID as the name, redirecting to another commit.
Thanks to Matthew Donoughe <mdonoughe@pm.me> for reporting the risk to security@forgejo.org.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1465): <!--number 1465 --><!--line 0 --><!--description Zml4OiBwcm90ZWN0IGFnYWluc3QgdGFncyAmIGJyYW5jaGVzIHRoYXQgbG9vayBsaWtlIHBpbm5lZCBTSEFzIGJ1dCBhcmUgbm90-->fix: protect against tags & branches that look like pinned SHAs but are not<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1465
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
Most issues were again due to incorrect path handling.
In `git.go` I chose an alternative authorization scheme which was simpler and avoids interaction with the Git Credential Manager on Windows.
I introduced the `github.com/powerman/fileuri` package which made the conversion from paths to URLs significantly easier for Windows.
I came across it in [this discussion](https://github.com/golang/go/issues/32456).
One decision I made was that env-files are expected to be given in UNIX style even when on Windows. This may be worth discussing.
Please let me know if any changes shall be revised.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1433): <!--number 1433 --><!--line 0 --><!--description Rml4IGlzc3VlcyB3aXRoIHRlc3RzIG9uIFdpbmRvd3M=-->Fix issues with tests on Windows<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1433
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Crown0815 <felix.kroener@gmx.de>
Co-committed-by: Crown0815 <felix.kroener@gmx.de>
When attempting to update a clone of an action or a reusable workflow with a commit reference, Forgejo Runner would erroneously not fetch the remote because it believed that commit were already present. That leads to an error:
```
runner(version:v12.5.2) received task 2 of job test, be triggered by event: push
workflow prepared
evaluating expression 'success()'
expression 'success()' evaluated to 'true'
git -C /tmp/tmp.K9MTg4Hvs0/.cache/act/4f/03a001f96fcf7afd5f55aed90c7de6ae304b7f800980f5e3f6d414a38e7ae7 remote get-url origin
git -C /tmp/tmp.K9MTg4Hvs0/.cache/act/4f/03a001f96fcf7afd5f55aed90c7de6ae304b7f800980f5e3f6d414a38e7ae7 rev-parse c58510e7c779846cb5f0801a159cbf91d971026c
Found revision: c58510e7c779846cb5f0801a159cbf91d971026c
☁️ git fetch 'http://192.168.124.88:3000/root/example-private-workflow-call' skipped; ref=c58510e7c779846cb5f0801a159cbf91d971026c cached
git -C /tmp/tmp.K9MTg4Hvs0/.cache/act/4f/03a001f96fcf7afd5f55aed90c7de6ae304b7f800980f5e3f6d414a38e7ae7 rev-parse c58510e7c779846cb5f0801a159cbf91d971026c
Found revision: c58510e7c779846cb5f0801a159cbf91d971026c
git worktree create for ref=c58510e7c779846cb5f0801a159cbf91d971026c (sha=c58510e7c779846cb5f0801a159cbf91d971026c) to /tmp/tmp.K9MTg4Hvs0/.cache/act/66/f8d01b29c88af989524f5b0324dcf963a4c0c9f8e118bc2795cd711a1a853d
git -C /tmp/tmp.K9MTg4Hvs0/.cache/act/4f/03a001f96fcf7afd5f55aed90c7de6ae304b7f800980f5e3f6d414a38e7ae7 worktree add -f --end-of-options /tmp/tmp.K9MTg4Hvs0/.cache/act/66/f8d01b29c88af989524f5b0324dcf963a4c0c9f8e118bc2795cd711a1a853d c58510e7c779846cb5f0801a159cbf91d971026c
git worktree add error: fatal: invalid reference: c58510e7c779846cb5f0801a159cbf91d971026c: exit status 128
```
The reason is that `git rev-parse` skips the existence check if a full commit hash is supplied.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1293): <!--number 1293 --><!--line 0 --><!--description Zml4OiBvbmx5IHNraXAgZmV0Y2hpbmcgd2hlbiBhIGNvbW1pdCBleGlzdHMgbG9jYWxseQ==-->fix: only skip fetching when a commit exists locally<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1293
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
The Forgejo Runner Makefile only looks for tests in some directories. If someone adds a test in another place, they have to remember to update the Makefile. That is error-prone and easy to forget. Another problem is that integration tests are stored alongside short tests and not in a separate directory tree. That makes it hard to separate them.
In response to https://code.forgejo.org/forgejo/runner/pulls/1255#issuecomment-71897, all `go test` commands now scan the entire source tree for tests. All integration tests are skipped if `testing.Short()` is `true`. While `make test` runs only short tests, `make integration-test` now runs **all** tests, no matter whether they are short or not. Separating them would either require the introduction of [test suites](https://pkg.go.dev/github.com/stretchr/testify/suite) or moving them to a separate directory tree.
CI was restructured to reflect the changes. The build step no longer runs any tests because the integration test step will run all tests anyway. CI might run slightly longer than before because short tests and some integration tests that do not require a container runtime are now run twice with each Docker version instead of once.
Additional slow tests were identified and marked as slow by running `go test -json -short ./... | gotestsum tool slowest --threshold 200ms`. Some were reclassified after a manual review.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1261): <!--number 1261 --><!--line 0 --><!--description Y2hvcmU6IGVuc3VyZSBhbGwgdGVzdHMgYXJlIHJ1bg==-->chore: ensure all tests are run<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1261
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
When cloning an action or a workflow with `git`, the target directory might not be empty, for example, due to a failed cloning attempt. Because the target directory's name is derived from the repository's URL that is about to be cloned, it would be an unrecoverable situation and would require human intervention to resolve it. To reduce the likelihood of such a situation, Forgejo Runner will try to delete the directory before cloning the repository containing the action or workflow.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1277): <!--number 1277 --><!--line 0 --><!--description Zml4OiB0cnkgdG8gZW1wdHkgY2xvbmUgZGlyZWN0b3J5IHRoYXQgaXMgbm90IGVtcHR5-->fix: try to empty clone directory that is not empty<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1277
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
Co-committed-by: Andreas Ahlenstorf <andreas@ahlenstorf.ch>
After patch that replaced go-git with shell git commands, the runner fails to clone private repositories with error:
```
fatal: could not read Username for 'https://...': No such device or address
```
Root cause:
The credential-store helper expects credentials in URL format (`https://user:token@host/path`), but the current implementation writes only the raw token to the file, causing git to prompt for username interactively.
Solution:
- Format credentials as proper URL with embedded token: `https://x-access-token:TOKEN@host/path`
- Add `credential.useHttpPath=true` to respect repository paths in credential matching
- Parse remote URL to extract host and construct valid credential-store entry
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1268): <!--number 1268 --><!--line 0 --><!--description Zml4OiBwcml2YXRlIHJlcG9zaXRvcnkgY2xvbmluZyB3aXRoIGF1dGhlbnRpY2F0aW9uIHRva2Vu-->fix: private repository cloning with authentication token<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1268
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Eugene F. <grand@codabra.io>
Co-committed-by: Eugene F. <grand@codabra.io>
When `workdir_parent` is a relative path, actions were failing with error:
```
⚙️ [runner]: failed to read action 'Checkout', no files found after reading paths: action.yml, action.yaml, Dockerfile
```
The cause of this is that worktree creation using `git -C relative/repodir worktree add relative/worktree` would actually create the `relative/worktree` inside the repo. It seems that `git -C` to operate on a repo changes the working directory into that repo and evaluates relative paths from there.
Fixed by converting `workdir_parent` into an absolute path after the config file is read, and adding an error in the git operations if a relative path somehow makes its way through.
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1175): <!--number 1175 --><!--line 0 --><!--description Zml4OiAnZmFpbGVkIHRvIHJlYWQgYWN0aW9uJyBlcnJvcnMgd2hlbiB1c2luZyByZWxhdGl2ZSB3b3JrZGlyX3BhcmVudA==-->fix: 'failed to read action' errors when using relative workdir_parent<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1175
Reviewed-by: limiting-factor <limiting-factor@noreply.code.forgejo.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
**Breaking:** forgejo-runner now requires access to `git` on its PATH in order to create efficient work trees for execution of remote git actions or workflows, such as `uses: actions/checkout`.
---
When you use a remote step action or a remote composite action, forgejo-runner will perform a clone of the remote repo into a temporary directory. For steps, the temporary directory will be named with a SHA of the `uses: ...` step text; for reusable workflows, it will be named with a combination of remote org,repo@ref. These are stored in `~/.cache/act` (or the `workflow_parent`, if overridden in the config file).
This design has these problems:
- Whenever the contents of `uses: ...` changes, an independent clone is performed as it causes a different unique directory name. For example, when changing from `uses: actions/checkout@v4` to `...v5`, the existing cached repo that contains `v4` is not reused in any way; a new cache is made for `@v5`.
- The contents of the temp directories are somewhat cleaned up by a `git reset --HARD` between uses, but non-tracked files could be left in the directory between runs polluting from one run to another; there's no `git clean -fxd` performed.
- The directory could be used concurrently by multiple running actions. If the git reference changes (eg. it is a reference to a tag, and it has changed in the second run), or if the workflow writes any content to the directory, it will pollute across action runs.
- Probably due to bugs identified in the past with performing operations on these shared repo directories, only a single clone operation can be performed by `forgejo-runner` at once:
- A mutex is used that permits a forgejo-runner to only clone one repo at a time -- c1fe7a26a3/act/common/git/git.go (L30)
- A redundant mutex is used during reusable workflow clones to permit only one clone at a time -- c1fe7a26a3/act/runner/reusable_workflow.go (L87-L96)
- **(Not resolved in this PR)**: All remote references are pulled during `git clone` of a remote, even if they aren't relevant to the reference being fetched. (To be fixed in the future based upon this change.)
To address these issues, this PR proposes this design update:
- Based upon the remote URL without the reference, a single bare clone repo will be maintained.
- When a reference is to a branch, tag, or unidentified sha, a fetch will be performed on the bare repo to get the current sha for the reference.
- For each execution using the repo, a new independent work tree will be created from the bare repo.
- The work trees will be cleaned up at the end of execution; the bare repo will remain to be reused.
- Concurrency control will be ~~handed over to git, since it is capable of managing multiple fetches and work tree creations from a single bare repo~~ transitioned to a finer grained `MutexMap`, allowing higher concurrency but not taking any risks of go-git's [unclear concurrency guarantees](https://github.com/go-git/go-git/issues/773).
This will address the problems described above. It does have a negative side-effect -- each running remote action will require creating a new work tree, increasing on-disk I/O where previously these might have been in-place already. However, this is a trade-off against reducing total disk I/O and usage by sharing a single repo over multiple references to that repo; so long-term usage will likely be lower.
WIP: the core work is done and ready to be put through the test battery to see if any unexpected problems occur, which is why I opened this PR. TODO:
- [x] Update the original repo to be a bare repo
- [x] Cleanup work trees after they are `Close()`'d
- [x] Seems like reference is slipping into the filepaths in `~/.cache/act` currently -- should be stripped
- [x] Pass through each commits to identify any needed automated testing revisions
- [x] Get all automated tests to pass
- [x] Perform manual testing as needed
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1162): <!--number 1162 --><!--line 0 --><!--description ZmVhdDogdXNlIGdpdCB3b3JrIHRyZWVzIGZvciByZW1vdGUgZ2l0IGFjdGlvbnMgJiB3b3JrZmxvd3M=-->feat: use git work trees for remote git actions & workflows<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1162
Reviewed-by: limiting-factor <limiting-factor@noreply.code.forgejo.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
When a remote action is referenced by a full SHA (eg. `- uses: actions/checkout@08c6903cd8 # v5`) and the local cache already has that sha, then skip performing a `git fetch` on the remote. Covered by new automated tests that also check tag updates work correctly (to ensure that `git fetch` *is* used in those cases).
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1160): <!--number 1160 --><!--line 0 --><!--description ZmVhdDogc2tpcCBmZXRjaGluZyByZW1vdGUgYWN0aW9uIHJlcG8gd2hlbiB1c2luZyBmdWxsIHNoYSBhbHJlYWR5IGZldGNoZWQ=-->feat: skip fetching remote action repo when using full sha already fetched<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1160
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
Many emoji technically have two forms, the colorful form and the monochrome text form. For some reason, on macOS, ☁️ defaults to the latter, which is also really tiny for some reason?. Adding the invisible emoji variant selector (U+FE0F) causes it to always render as the colorful full-width graphic
Before:

After:

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
- [PR](https://code.forgejo.org/forgejo/runner/pulls/1076): <!--number 1076 --><!--line 0 --><!--description ZGlzYW1iaWd1YXRlIGNsb3VkIGVtb2pp-->disambiguate cloud emoji<!--description-->
<!--end release-notes-assistant-->
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1076
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Andrew Cassidy <drewcassidy@me.com>
Co-committed-by: Andrew Cassidy <drewcassidy@me.com>
To prepare for a smooth merge in the runner codebase.
- run with --fix for gofumpt and golangci
- manual edits for
- disabling useless package naming warning
- rename variables that had underscore in their name
- remove trailing else at the end of a few functions
Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/206
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>
- 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
* Use go-git to find remote URL
* Use go-git package to resolve HEAD revision (commit sha1)
* Use go-git to find checked-out reference
* Remove unused functions
The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.
[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: support docker create arguments from container.options (#1022)
* fix processing of errors, add verbose logging, fix test
* disable linter for code copied from docker/cli
* fix all linter issues
* Add license info
* Add opts_test.go from docker/cli and required testdata
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: use logger from context wherever possible
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* feat: add step/job id and results to json logs
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* test: value to be masked should not be hard-coded in the action
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* fix: replace values following ::add-mask:: in evaluated strings
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* feat: [DEBUG] identifier for debug logs to distinguish them
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* feat: replace logger with step logger
The container gets injected a job logger, but during the time that steps
are run, we want to use the step logger.
This commit wraps pre/main/post steps in an executor that replaces the
job logger with a step logger.
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* feat: add pre/post stage identifier fields to json log output
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
* feat: add job/step result status to skipped steps/jobs
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>