feat: merge forgejo/act/pkg in the act directory #753

Merged
earl-warren merged 967 commits from earl-warren/runner:wip-act into main 2025-07-28 17:10:26 +00:00
Contributor

The https://code.forgejo.org/forgejo/act repository is merged into the runner, as the act sub-directory, preserving the commit history.

This pull request is extremely large and it will be a noop when merged. To effectively be used by the runner, the following must also happen:

  • change the module name in act
  • change references to act in the runner to use the act subdirectory
  • add a workflow to run all tests found in the act subdirectory

Although this could be done in this pull request, it feels that it could be done in a followup pull request that is not so large and easier to review.

Extract from ACT

Only keep the pkg directory and rename it act.

git clone https://code.forgejo.org/forgejo/act transplant-act
cd transplant-act
git filter-repo --path-rename pkg:act
cat > /tmp/remove.txt <<EOF
act-cli.nuspec
.actrc
codecov.yml
CODEOWNERS
CONTRIBUTING.md
.editorconfig
.forgejo
.gitignore
.gitleaksignore
.golangci.yml
go.mod
.goreleaser.yml
go.sum
IMAGES.md
install.sh
LICENSE
Makefile
.markdownlint.yml
.mega-linter.yml
.mergify.yml
.prettierignore
.prettierrc.yml
README.md
renovate.json
VERIFICATION
VERSION
.vscode
EOF
git filter-repo --invert-paths --paths-from-file /tmp/remove.txt

Merge

cd runner
git remote add transplant-act ../transplant-act
git merge --allow-unrelated-histories transplant-act/main

Ignore the act directory

The act directory is ignored (commit chore: ignore the act directory for now) when:

  • building the binary
  • running tests
The https://code.forgejo.org/forgejo/act repository is merged into the runner, as the `act` sub-directory, preserving the commit history. - this will make it more difficult to cherry-pick commits from https://github.com/nektos/act but [based on a detailed analysis of the commits from the past year](https://code.forgejo.org/forgejo/runner/issues/678) it is not too much work - this will make it a easier to develop and test code that was previously split between ACT and the runner, which is expected to positively balance the additional friction when cherry-picking from https://github.com/nektos/act This pull request is extremely large and it will be a noop when merged. To effectively be used by the runner, the following must also happen: - change the module name in act - change references to act in the runner to use the act subdirectory - add a workflow to run all tests found in the act subdirectory Although this could be done in this pull request, it feels that it could be done in a followup pull request that is not so large and easier to review. ## Extract from ACT Only keep the pkg directory and rename it act. ```sh git clone https://code.forgejo.org/forgejo/act transplant-act cd transplant-act git filter-repo --path-rename pkg:act cat > /tmp/remove.txt <<EOF act-cli.nuspec .actrc codecov.yml CODEOWNERS CONTRIBUTING.md .editorconfig .forgejo .gitignore .gitleaksignore .golangci.yml go.mod .goreleaser.yml go.sum IMAGES.md install.sh LICENSE Makefile .markdownlint.yml .mega-linter.yml .mergify.yml .prettierignore .prettierrc.yml README.md renovate.json VERIFICATION VERSION .vscode EOF git filter-repo --invert-paths --paths-from-file /tmp/remove.txt ``` ## Merge ```sh cd runner git remote add transplant-act ../transplant-act git merge --allow-unrelated-histories transplant-act/main ``` ## Ignore the act directory The `act` directory is ignored (commit `chore: ignore the act directory for now`) when: - building the binary - running tests
add windows compatibility
Allow empty string secrets
Allow non-symbolic-ref HEAD
fixes #12
ci-via-github-actions
fix #22: require prefix './' for local actions
Replace parser with new parser from GitHub
--watch
- No need to compile regexes in the function, moved them to vars
- Fixed github http regex: it was not matching https://github.com/foo/bar (no git extension)
Regex tweaks
Detect workflow event type
Use stdout for actionLogger
Add flag to skip pulling images already present
- Refactored logDockerResponse function to remove extra if-else nesting
- logDockerResponse func now returns an error if error was detected from the log stream
- logDockerResponse will check for msg.ErrorDetail.Message and bail if there's an error
Handle docker image build failures
Ignore error, vet failure
Render correct graph for non-default events
Use docker’s stdcopy to ensure we don’t emit garbage bytes to stdout
feat: support branches as GITHUB_REF
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Signed-off-by: Casey Lee <[email protected]>
Iss 86
* fix #117 - handle whitespace in actrc secrets

* Switch to raw string on regex pattern

Co-authored-by: Casey Lee <[email protected]>
* fix #128: guard against empty actionName when 'uses: ./'

* fix #129 - force image name to be lowercase
* Bump golang to v1.14

* go mod vendor

Co-authored-by: Casey Lee <[email protected]>
* Upgrade docker to v19.03.7

* go mod vendor

* golangci-lint 1.23.8
* fix #132 - publish chocolatey package for act

* add missing files to pass validation

* remove extra choco step
* Add support for runs-on array form (closes #146)

* Fixed style issues

Co-authored-by: Casey Lee <[email protected]>
* feat: load every environment from --env-file to workflow

* fix: pass dotenv's environments through by context

* updates to support --secret-file

Co-authored-by: Casey Lee <[email protected]>
* Use env variables in Action.Runs.Env

* Use Action.Runs.Env in all the cases
The string comparison in `step_context.go` is currently case sensitive. This commit adds an error that returns the valid options and tells the user what value they passed
Currently, providing `using: Docker` is an error as the switch statement in `step_context.go` is case sensitive.

Actions run successfully on GitHub with `using: Docker` leading me to believe that they're case insensitive. This commit updates `act` to match

Co-authored-by: Casey Lee <[email protected]>
Signed-off-by: Sven Dowideit <[email protected]>

Co-authored-by: Casey Lee <[email protected]>
In #222 I added case normalisation to ReadAction() to ensure that Docker and docker are interpreted the same way.

I realised that this was being done at the wrong level and required multiple type conversions. By implementing `func (a ActionRunsUsing) UnmarshalYAML` we can lowercase the string as it's being unserialized

This has an added benefit that any time this type is hydrated the `runs.using` key will be lowercased, rather than relying on `ReadAction()`
* Ignore .idea

* Add Env to the RunContext vm so we can Evaluate and Interpolate `env.xx`

* Make EvalBool support expressions more in line with the github runner

* Turns out Boolean(value) is what github is doing after all

* Add test for github context as well
This adds the `-a` flag when running `act` to change the username of the GITHUB_ACTOR environment variable

Co-authored-by: Casey Lee <[email protected]>
Previously secrets would be shown in log output as provided. This
commit updates the stepLogFormatter to replace any instance of the secret
string with "***", as GitHub Actions would

Known issues: If the secret is a generic string (such as "docker"), all
occurances of that string will be replaced in the output

Co-authored-by: Casey Lee <[email protected]>
* spelling: cartesian

* spelling: deferring

* spelling: marshal
Co-authored-by: Casey Lee <[email protected]>
Currently setting workflows with the -W (--workflows) flag only accepts
a folder. It is not possible to run a single workflow.yml file.

This commit allows either a single file or a directory to be passed into
the workflows flag.
Change -W command to accept a single file
* Pull latest changes from ref using cached repo

Act switched from checking out a branch to checking out
a hash in order to resolve #24 - see
4e66f2c8be

This had a side effect of preventing `w.Pull()` from updating
to the latest commit if a ref was a branch/tag and the repo
already exists on disk.

This commit checks if input.Ref is equivalent to the resolved
hash, and runs `r.Fetch()` and checks out the branch for input.Ref
if it is different. `w.Pull()` can then pull the latest changes
before we checkout `*hash` again like normal

* Extract CloneIfRequired to reduce cyclomatic complexity

Co-authored-by: Casey Lee <[email protected]>
* Test setup before I try to understand how things work

* Remove .gitignore before we run docker cp
#273
* Rewrite contexts before evaluating them

* Precompile context and expression patterns

* Test trim before rewrite

The current contextPattern is quite constraining and would fail the
rewrite of a context with trailing spaces. Triming happens during the
execution of Interpolate, and these tests aim to detect future breaking
changes on this behavior.

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
fix: add default values in vmInput
Document `secret-file` in README and add example
add privileged mode
Note that we don't support the more general use of defaults, just its
run key for setting shell and working directory.

The documentation for defaults.run is here:
  https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun

Fixes #214.

Co-authored-by: Casey Lee <[email protected]>
Signed-off-by: Yoan Blanc <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* set ${{github.event.repository.default_branch}}

* change `ok == false` to `!ok`

Co-authored-by: Casey Lee <[email protected]>
* feat: add fromJSON support

* feat: support custom runId and runNumber

* chore: manual update

* chore: lint
fixes #333
see https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
Fixes #185

Signed-off-by: Javier Romero <[email protected]>
* When running on Windows the correct path separator must be used. filePath.join is OS aware, so when we want to use forward slash use path.join instead.

on windows docker cp should end with \. when copying a directory
when running npm modules we should pass in path with all forward slashes

This fixes #331

* When calculating relative folders on Windows for destination path on Linux, we need to change \ for /

* Reduce complexity by extracting methods

* V1 does not point to a file that does not exist

* Looks like something else is the cause of this test breaking. Last successful build is #371, builds after that are failing
* Simpler list view

* lint

* readding graph viz with -g/--graph

Co-authored-by: Leonid Shamis <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* fix: outputs espace

* refactor: move unescape to func

* refactor: fix ci lint

* refactor: unescape function
To make the handling of ExtraPath portable append it to the front of the
PATH when it exists, instead of always changing the script.
In PR #406 I used PathSeparator and I should have used PathListSeparator.
 See: https://golang.org/pkg/os/#pkg-constants
Uses rc.ExprEval.Interpolate on container image.
* Test more if env variants

* The correct negation syntax is !=

* Make the Interpolate function support negated booleans from envs

* Move assert := a.New(t) into t.Run

This uncovered that some of the test premisses was wrong and the
Eval Bool function also had flaws

* Remove a stray logrus import
* A new attempt at Interpolation and EvalBool

* One small merge fix

* Remove some fmt.Printfs
* Test more if env variants

* The correct negation syntax is !=

* Make the Interpolate function support negated booleans from envs

* Move assert := a.New(t) into t.Run

This uncovered that some of the test premisses was wrong and the
Eval Bool function also had flaws

* Remove a stray logrus import

* Add an ACT env set to true

This can be used to skip certain steps that you don't want to run locally
when testing. E.g. steps that sends messages to Slack channels on successful
builds etc.

* Add a description about env.ACT to the readme

* A new attempt at Interpolation and EvalBool

* One small merge fix

* Remove some fmt.Printfs

* Fix some merge conflicts
This will allow other tests to be created in runner_test.go that can
be tested individually.
* fixes include directive of strategy build.

* Adds test for include and exclude in matrix builds.

* ubuntu-16.04 instead of 20.04

* Adds more platforms for runner_test

Prevent most "skipping unsupported platform messages".

* correct printing for unsupported platform

* fix merge
Co-authored-by: Casey Lee <[email protected]>
If there are custom hooks in ~/.git_template/hooks,
they can occur an error on such as pre-commit hooks.

Co-authored-by: Casey Lee <[email protected]>
* Upgrade to the official golangci-lint action and fix some issues it found

* Update deps

* Remove a shadow warning

* Initialize the splitPattern only once

* Initial attempt at supporting $GITHUB_ENV

Needs some polishing and tests

* Now it's actually working

* Replace golang.org/x/crypto/ssh/terminal with golang.org/x/term

* Disable the issue-228 test again

* The linter is picky

* Discovered that the workflow/envs.txt had to exist in certain cases

* Fix small linter issue
If an action uses the branch to pin the major version, `- use: user/action@v1`
will stop with an error: "v1: reference not found."

In this case `act` should use refs/remotes/origin/v1 as a name to resolve v1 revision.

Co-authored-by: Casey Lee <[email protected]>
* Uppercase secrets, print error when secret with same name already exists

* Test lower-to-upper case formatting for secrets
This is a solution to issue #416 where environment variables created or
changed in the previous step are not usable in the next step because
the rc.ExprEval is from the beginning of the previous step.

This change refactors setupEnv so that before interpolating the environment
variables a NewExpressionEvaluator is created.


Fixes: 416
Make stale bot action less aggressive
Days before marking issues/PRs as stale: 30
Days before closing stale issues/PRs: 14
* Update flags in README

* Add secrets and `.env` files examples

* Fix typo: environment

* Fix typo: returned

* Add --version back, since I've built act without ldflags
Co-authored-by: Casey Lee <[email protected]>
* Add autodetect event flag

* Add new flag to README.md

* Make help more clear
Co-authored-by: Ed Tan <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* Add survey during first run for a default image

* few minor formatting updates

* Use image from DockerHub

Co-authored-by: Casey Lee <[email protected]>
* Load .secrets file as default

* Update README
Co-authored-by: Casey Lee <[email protected]>
* Throw an error if the steps has a invalid uses directive

* Refactor TestStepContextExecutor
This fixes #499, where a matrix strategy with only include keys ends up
causing multiple builds.  This bugs appears to have been introduced in #415,
when extra include keys are added in the matrix strategy.  The cause
seems to be because the CartesianProduct function returns an item with
empty keys, instead of return an empty set.

Co-authored-by: Ed Tan <[email protected]>
* Update README

* Add notice about large image, add link to repo for `.actrc`
Co-authored-by: Casey Lee <[email protected]>
fixes #528

Co-authored-by: Hugh Lunt <[email protected]>

Co-authored-by: Hugh Lunt <[email protected]>
Co-authored-by: sinozu <[email protected]>
Co-authored-by: sinozu <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* feat: step continues when continue-on-error is ture

* fix: typo, logging and make bool continuable

Co-authored-by: Casey Lee <[email protected]>
I got an error like this after hitting `act` command.

> Error: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled

According to the document, when user namespaces are enabled on the Docker daemon,
neither host network mode and --privileged work without --userns=host. Since `act`
uses host network mode to match GitHub Actions runners, it cannot run jobs when
user namespaces are enabled. So I added the flag.

https://docs.docker.com/engine/security/userns-remap/#user-namespace-known-limitations

Co-authored-by: Casey Lee <[email protected]>
* fix: replace `\` with `/` in git ref to fix `git_test.go` on windows

Paths on Windows use backslash (`\`) as directory separator and this breaks `TestGitFindRef()`.
Replacing `\` with `/` in git ref fixes that issue.

* fix: replace `gopkg.in/godo.v2/glob` with std library `path/filepath`

`github.com/go-godo/godo` lib has been last updated in 2016 and it also
depends on another outdated lib `github.com/MichaelTJones/walk` with
last update in 2016. This also fixes `permission_denied` errors on
Windows (and perhaps Linux in some specific cases). I'm not aware of
any performance improvement or drawback because of that change.
* fix: give case insensitive secret more meanigful name

* refactor: use `string` in generating `env:` and `steps:` for workflows

Smaller text generation is much better to read with normal strings than
raw string literals.

* feat: sort keys for `env:` so it's always in specific order

* fix: update test workflows
* Add QEMU to run different architectures

* Update dependencies in `go.mod`

* Add `--container-architecture` flag to specify custom image architecture

Co-authored-by: Casey Lee <[email protected]>
* Feat: Add snapshot artifacts to PR builds

* Separate Artifacts to keep file size down

* Name the tasks
Currently all secrets are exposed when running with `--verbose`/`-v` option
Hardcode current `ubuntu-latest` since we have no way to check that 'on the fly'
GitHub Actions switched `ubuntu-latest` to `ubuntu-20.04`
Ref:
  https://github.com/actions/virtual-environments/issues/1816
  https://github.com/actions/virtual-environments/pull/2852
* add codecov integration

* include past tags when releasing
* feat: add code testing on macos

* change name of test job

Keep the test job named `test` to align with current branch protection checks

Co-authored-by: Casey Lee <[email protected]>
* Update Shell Tasks to match ScriptHandlerHelpers
Code: https://github.com/actions/runner/blob/main/src/Runner.Worker/Handlers/ScriptHandlerHelpers.cs

Docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell

Fixes #467

* 🩹 Remove old ps1 handler

* ♻️ gocritix fix

* 🐛 Powershell command must be a single entry to docker API
Fixes #467

* Remove Act Temp

* Remove additional Act Directories

* remove hard-coded workdir

Co-authored-by: Casey Lee <[email protected]>
Commit fef399d057 introduced support for
specifying a container image platform for cross-platform image building.

Unfortunately, attempting to execute a docker command that includes the
`--platform` flag against Docker daemons using API Version 1.40 and
before results in the following error:

```
"specify container image platform" requires API version 1.41, but the Docker daemon API version is 1.40
```

To allow `act` to be used on the 19.03 Docker CE and earlier versions,
this patch simply checks the Docker daemon API version and only
specifies platform specification when the daemon API version is 1.41 or
greater.

Fixes Issue #586
* Comment for public function

* Add git describe fallback

* spelling: github

* Set initial branch to satisfy tests for modern git

* Clarify -even- if

* Go 1.16

* Support running commands in repositories without action.yaml

Support runnings commands with only a Docker file

Co-authored-by: Casey Lee <[email protected]>
fixes https://github.com/nektos/act/issues/536
* Add support for composite actions

* Fix to make more complex composite actions work

* Fix to make more complex composite actions work

* Let's validate the steps in the composite steps to fail on uses and run's without shell, like the real world

* Add support for composite actions

* Add workflow to test composite actions

* Log instead of panicing when output is mismatched

* Merge maps so environment variables are not lost

* Remove Debug

* Correect merge error

* Remove invalid composite tests.

* Fix composite test

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: monkers <[email protected]>
Co-authored-by: Mike Moncrieffe <[email protected]>
* refactor: move survey/cfgs into own funcs, read XDG base dirs for config

Moved actrc locations to own func since it can be reused.
Moved survey part to own func due to high cyclomatic complexity.
Added XDG config dir to config locations.
Replaced using HOME envvar with go-homedir module since it's already
an indirect dependency and handles home directories better
for each GOOS.

* refactor: use `go-homedir`, check if XDG var is not empty
* fix: rework macOS test so it's faster

* feat: add go module caching
- Don't set architecture, let Docker host decide it's own platform,
  remove `runtime` dependency and don't show default in `--help`
- Remove most tests, we need to check only once if it works on
  different platform
- Rename `DeleteImage` to `RemoveImage` to conform to existing
  function in `docker` cli, added options to specify `force` and
  `pruneChildren`
Walking the directory tree underneath `.git/refs` is not reliable, as it usually does not
return tags, especially for freshly cloned repos and/or tags fetched from a remote.

The go-git library provides an iterator over all git references.

This approach prefers a reference (tag, branch) from go-git, if found. If none is found,
it falls back to the previous implementation.
* disable gitignore for actions

* feat: Add option to allow/disallow paths specified in .gitignore

Co-authored-by: Alan Birtles <[email protected]>
feat: add flag `--no-recurse` to disable recursion when reading workflows from directories
feat: added more tests to `TestPlanner`, renamed `TestJobFileInfo` to more appropriate name `WorkflowPlanTest`
style: changed error message to lowercase, added single quotes for better visibility

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* feat:(Changed order of events, to prevent enviroment to run before if statement is run

* changed issue597 to issue-597

* Added test for linux/amd64
* feat: bump `golangci-lint`, add `super-linter`, replace outdated linter

Bump `golangci-lint` version.
Add `super-linter` to lint other languages.
Go linter is disabled because it's currently broken:
https://github.com/github/super-linter/pull/370
Replacing `scopelint` with `exportloopref`: "[runner] The linter
'scopelint' is deprecated (since v1.39.0) due to: The repository of the
linter has been deprecated by the owner.  Replaced by exportloopref."
Fixed formatting in `.golangci.yml`
Add addtional linters:
  `misspell`: purely style, detects typos in comments
  `whitespace`: detects leading and trailing whitespace
  `goimports`: it's gofmt + checks unused imports

* fix: lint/fix `go` files

* fix: lint with `standardjs`

* fix: lint/fix with `markdownlint`, make template more verbose

* feat: add lint stuff to makefile

* fix: `UseGitIgnore` formatting

* fix: lint/fix `README.md`

Co-authored-by: Casey Lee <[email protected]>
* Refactor maybeCopyToActionDir

* Use maybeCopyToActionDir for model.ActionRunsUsingComposite
* Separate Container Workdir from Host Workdir

* Add delegated component to MacOS Test

* Lint: Remove leading newline

* Fix trailing path issue
* Mergify: configuration update

* cleanup workflows, codecov and mergify
* Remove pwsh -login and add Pwsh test

* Add Shell Command Test for coverage

* 🧪 Move PWSH Platform definition to inline test, it can always be expanded out later

Reference: https://github.com/nektos/act/pull/660#discussion_r626171728

* Test MacOS Build for transient failure

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add custom docker registry authentication

Uses DOCKER_USERNAME and DOCKER_PASSWORD as secrets provided into
the act cli.

Closes #527

Co-authored-by: Björn Brauer <[email protected]>

* Add test to check if pull authentication is filled in

* Update debug message to be more descriptive

Co-authored-by: Ryan (hackercat) <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Ryan (hackercat) <[email protected]>
* Add option to specify custom GitHub instance

* Use correct GHE API endpoint URLs

Co-authored-by: Markus Wolf <[email protected]>

* Extract slug from GitHub Enterprise URLs

Co-authored-by: Markus Wolf <[email protected]>

* Use GITHUB_TOKEN for clone authenticate if provided

This change will allow use authentication for cloning actions
from private repositories or github enterprise instances.

Co-Authored-By: Markus Wolf <[email protected]>

* Add section about using act on GitHub Enterprise to README

Co-authored-by: Markus Wolf <[email protected]>

* Set GitHubInstance in runnerConfig in runner_test

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: hackercat <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>
* Potentially solved merge conflict

* Update pkg/model/planner.go

Based on feedback

Co-authored-by: Ryan (hackercat) <[email protected]>

* Fixed compilation error

* added missed test

* Fixed spelling error to work with lint error

Co-authored-by: Ryan (hackercat) <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* fix: environment variables sourcing from `/etc/environment`

* fix: move `envs.txt` & `event.json` to `/tmp/`

Since #635 `envs.txt` is not copying properly when running `act` in WSL2
Moving it to fixed location resolves that.
* Regression in the .golangci.yml file

* This looks like an even better fix to #451

The previous solution only prevented the `starting container process caused "exec: \"bash\"`
error when someone added an "extra" path in the workflow using `::add-path`

* Add support for >> $GITHUB_PATH

* The newRunCommand has too high cyclomatic complexity

* Add "linux/arm64" to new test

* The cyclop linter was complaining so I extracted some funcs

* Close some readers

* Fix typo

* fix: add missing composite function

* Fix regress from merging

* Keep the error messages as is

* consolidate with master

* Close the tar reader on defer

* New way to get ContainerWorkdir

* Remove arch from runner test

* Separate the UpdateFromEnv and UpdateFromPath

Co-authored-by: hackercat <[email protected]>
* define GITHUB_ACTION_PATH #603

* Add more environment variables

* Add job name

Note: the job name gets a suffix for matrix builds, but this is not part of the env var

* fix: remove unnecessary variables

* feat: add `RepositoryOwner`

credit: @KnisterPeter

* feat: add test for `getGithubContext()`

Co-authored-by: Ryan (hackercat) <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
adding more tests
returns same message for short SHA format like GitHub Actions
refactor error checking
add more errors :)
* Fix: Skip Checkout Regression

* Fix test name

* Add newline to end of checkout push test

* Restore .gitignore from node12 test. Todo: Restore that file after the test

* Format workflow

* Test: Fix path slash direction for windows relative source path

* Add explicit nil test for newRemoteAction

* Regress .secrets during tests

Co-authored-by: Ryan (hackercat) <[email protected]>
* fix: hide masked value

The ::add-mask:: command output logs the value to be masked.
This does expose critical information which should be hidden from
the output.

* Add test to not output secret in add-mask command

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: remove `gotest.tools`

* remove all references to `gotest.tools` and replace it with
  `github.com/stretchr/testify` which was originally used for tests
* bump `golangci-lint` version
* add `depguard` and `importas` to prevent import of unwanted packages
* add custom schema and information about config since
  schemastore.org has broken schema for `golangci-lint` config

* fix: handle more error cases
Co-authored-by: Björn Brauer <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* GITHUB_PATH is prepend

https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

* Check for replacing system binaries

Co-authored-by: Josh Soref <[email protected]>
Co-Authored-By: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: format `.goreleaser.yml`

* feat: add `arm64`/`arm` builds

* feat: capture all binaries built by goreleaser

`upload-artifact` actions will run only on GitHub Actions due to
`ACTIONS_RUNTIME_TOKEN` requirement

* fix: remove `windows/arm/6`
* feat: add option to specify user for exec

* fix: move actions to static path outside workdir

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ContainerExecAttach implicitly runs ContainerExecStart while attaching
to stdout/stderr.
Ref: e02bc91dcb/client/container_exec.go (L40)

Calling both can lead to a race condition as observed in #627

Fixes: #627

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
This patch adds two new command-line flags to specify one or
more kernel capabilities to add or remove from the workflow
containers.

The command-line flag `--container-cap-add` allows for adding
specific capabilities on the workflow containers; where as,

The command-line flag `--container-cap-drop` allows for removing
specific capabilities on the workflow containers.

This was developed to specifically be able to add `SYS_PTRACE`
to a workflow I maintain. It involves using this capability to
monitor a make build, to then build a compilation database.

Signed-off-by: Joseph Benden <[email protected]>
* fix: update issue template

add additional information to be provided by user that should help in troubleshooting

* fix: move markdownlint config and link it

done it so the markdownlint-cli stops shouting about issues

* feat: add Matrix link

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: change `env` to be an interface

allows to use GitHub functions like `fromJson()`

* fix: change matrix to an interface instead of map

This allows to use GitHub functions like `fromJson()` to create dynamic
matrixes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
if someone is using image with a non-root user, they will get a permission denied since only root has write perms
This patch adds a new command-line flag (`--rm`) to automatically
stop workflow container(s), just prior to exit. The default
behavior is kept, e.g.: the containers continue running at exit.

Fixes: #694
Signed-off-by: Joseph Benden <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Skips docker cp for local actions and use their correct path
Defines GITHUB_ACTION_PATH also for nodejs actions
Evaluate Env of composite action
Evaluate Run of composite action correctly
Evaluate Shell of run step
Evaluate WorkingDirectory of run step
Changed tests for behavior change

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Test fixups for Windows/Forks

* revert change for repo/actor/owner

this is fixed via https://github.com/nektos/act/pull/723

Co-authored-by: Ryan (hackercat) <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: typo

* fix: remove debug for git references

it generates a massive amount of logs

* feat: read values from env

allows to test act on GHA when it's not a main repo

* fix: merge extrapath with PATH

* fix(tests): add additional shells for testing

* fix(image): update images

pin node to major version only, current node version: 12.22.1
replace most images with `node:12-buster-slim` to prevent
errors on macOS runner due to DockerHub pull limit
replace ocaml image

Co-authored-by: Casey Lee <[email protected]>
* fix: warn Apple M1 (arm64) users

* fix: missing dep

* fix: linting

* fix: linting (again)
* Add outputs field to job model

* Add output interpolation for jobs

* Add otto config reference for interpolated job output values into 'needs' context

* Add output interpolation call after job has completed.

* gofmt

* Remove whitespace

* goimports

Co-authored-by: Casey Lee <[email protected]>
* Fix defaults (composite)

* uses-composite: rely on defaults to pass

* Add test_input_required back, needs more tests

* Update Tests to test defaults carefully
The current algorithm given `ubuntu-18.04` returns `ubuntu18.04` when it should be `ubuntu18` according to https://github.com/actions/virtual-environments/issues/345#issuecomment-581263296.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fix localaction tests (missing checkout)

Co-authored-by: Ryan (hackercat) <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Fix format function {{, }} are escapes

Added some tests for some corner cases

* Update format function added 2 error checks
* fix[workflow]: multiple fixes for workflow/matrix

fix[workflow]: default `max-parallel`
fix[workflow]: default `fail-fast`, it's `true`, not `false`
fix[workflow]: skipping over the job when `strategy:` is defined but `matrix:` isn't (fixes #625)
fix[workflow]: skip non-existing includes keys and hard fail on non-existing excludes keys
fix[workflow]: simplify Matrix decode (because I "think" I know how `yaml` works) (fixes #760)
fix[tests]: add test for planner and runner

* fix(workflow): use yaml node for env key

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* docs: fix wrong licence link

* fix: add more formatting settings, reformat all

feat: add vscode extensions recommendations

* docs: update contributing documentation

* fix: remove unnecessary comment

it was due to broken checkout

* docs: rework installation section

it has been brought up few times, new style should be easier
to understand

* docs: update images provided by catthehacker

* docs: replace 18.04 with recent image

* fix: add final new line
* Fix local Docker actions: invalid reference format

* Create Dockerfile

* Create Dockerfile

* Update push.yml

* Revert "Create Dockerfile"

This reverts commit 9d1dbbc2c7fdf52963e55feb4148ac2b14d639d0.

* Fix lint

* fix: re-use image that is already present in repo

ubuntu:latest would pull unnecessary blobs from registry and count toward API limit

* fix: revert change

reverting due to issue in image deletion that will have to be investigated separately

Co-authored-by: Ryan <[email protected]>
* fix: align other Docker executors to print action

* fix: formatting

* fix: add proper workdir support

* fix: replace script filepath after slice creation

* fix: match substring so it works for pwsh

+ rename containerPath to scriptPath to reflect what value it contains
fixes https://github.com/nektos/act/issues/754
this will prevent actions from failing that use resources outside
of the action directory
* ci: bump Go version & move it to env

* go.mod: bump golang.org/x/term

* ci: capture Windows arm64 binary

Co-authored-by: Casey Lee <[email protected]>
* Cache dockerhub images from linux for macOS

An attempt to avoid hitting the dockerhub Pull Rate Limit.

* parallelize / refactor docker cache

Co-authored-by: Casey Lee <[email protected]>
Add Dependabot to keep dependencies up to date
* Refresh hash after pull for branch refs

* Bump

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: remove ubuntu-16.04

* fix: add missing links for nix/go

* fix: remove specific platform versions
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* build(deps): bump all Go deps

* build(deps): bump actions/setup-go & actions/stale
Co-authored-by: Casey Lee <[email protected]>
* fix: read envvars from image definition

* fix: add test

* fix: sort slices

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: re-implement `embed` without "unused" import

* fix(gitignore): ignore local docker registry data
* fix: rewrite how image env is merged

* test: add test for extractFromImageEnv
* fix: rewrite StepContext env

step env from workflow should be last one to be written
fixes https://github.com/nektos/act/issues/777

* test: verify env correctness

* fix: move test into existing workflow
* ci: unpin goreleaser version

homebrew issue has been fixed

* ci: drop homebrew from goreleaser

act has been for quite a long time in homebrew-core
and it supports all macos/linux so there is no
reason for us to have separate tap, as it might
confuse some users

Co-authored-by: Casey Lee <[email protected]>
* Close docker client!

* Fix nil dereference

* Update run_context.go

* Bump

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Running Docker on non-Linux platforms is very painful,
especially in CI. It's better to remove macOS for now,
until a better implementation is present.

Signed-off-by: hackercat <[email protected]>
* fix: avoid triggering %!/(MISSING) for docker output

* fix: suppress --platform for empty platform

Co-authored-by: Josh Soref <[email protected]>
* fix: set default shell for containers to sh

This matches GitHub Actions behaviour where,
runners use bash since it's guaranteed to exist there
while containers use sh for compatibility

* tests: fixup for default shell
* Add asset server and upload handling of binary files

Co-authored-by: Björn Brauer <[email protected]>

* Add asset download parts to the asset server

Co-authored-by: Björn Brauer <[email protected]>

* Add artifact-server-path flag

If the flag is not defined, the artifact server isn't started.
This includes the configuration of ACTIONS_RUNTIME_URL and
ACTIONS_RUNTIME_TOKEN which are set if the server is started.

Co-authored-by: Björn Brauer <[email protected]>

* Move ACTIONS_RUNTIME_* vars into the withGithubEnv setup

Co-authored-by: Björn Brauer <[email protected]>

* feat: add artifact server port as flag

This commits adds a flag to define the artifact server port.
If not given, the port defaults to 34567.

Co-authored-by: Björn Brauer <[email protected]>

* test: add artifact server tests

Co-authored-by: Björn Brauer <[email protected]>

* refactor: use fs.FS

This allows to add tests with in-memory file system

* feat: add support for gzip encoded uploads

Co-authored-by: Björn Brauer <[email protected]>

* test: add artifact integration test

* chore: run act tests with asset server path

Co-authored-by: Björn Brauer <[email protected]>

* docs: add new cli flags

Co-authored-by: Björn Brauer <[email protected]>

* test: add test workflow to testdata

* feat: add log output

* refactor: log shutdown error instead of panic

* feat: use outbound ip for the asset server

This change should allow to use the host ip in macos and windows.
Since docker is running in an intermediate vm, localhost is not
sufficient to have the artifacts in the host system.

* fix: do not use canceled context

To shutdown artifact server, we should not use the already canceled
context but the parent context instead.

Co-authored-by: Björn Brauer <[email protected]>

* feat: shutdown artifact server at end of pipeline

When the pipeline is done the asset server should be shut down
gracefully.

Co-authored-by: Björn Brauer <[email protected]>

* fix: close server if graceful shutdown failed

Co-authored-by: Björn Brauer <[email protected]>

* fix: ignore server closed error from listen call

Co-authored-by: Björn Brauer <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
* ci(golangci-lint): switch to latest

remove schema override since it was fixed in upstream

Signed-off-by: hackercat <[email protected]>

* fix: apply lint fixes
We should reuse an existing context logger if available.
This will allow test to setup act with a null logger to assert
log messages.

Co-authored-by: Björn Brauer <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Signed-off-by: hackercat <[email protected]>
Signed-off-by: hackercat <[email protected]>
* tests(pkg/common) add failing test case for SSH git URL

* fix(pkg/common) github SSH regex for missing .git extension

Co-authored-by: Ryan <[email protected]>
Signed-off-by: hackercat <[email protected]>
Signed-off-by: hackercat <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* test: fromJSON should work with arrays

* fix: fromJSON should work with any JSON
This reverts commit 2e264d8df8.
* fix: correct env pattern regex

GitHub Actions allows for envvars to contain

Signed-off-by: hackercat <[email protected]>

* format: format and typo fix

Signed-off-by: hackercat <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Don't interpolate joboutputs, before job is donei

All credits go to @ChristopherHX which fixed this issue.
I only created a PR for this so it will be fixed in the upstream binary.

This fixes #758

* Added output test

* Fix typo
Adds option to rebuild local action docker images

Fixed up README due to missing flags after
PR #714 and #716

Signed-off-by: hackercat <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: hackercat <[email protected]>
We should reuse an existing context logger if in test context.
This will allow test to setup act with a null logger to assert
log messages.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
* feat: add more steps context support

- Add step outcome
- Remove step success in favour of conclusion

* feat: add conclusion and outcome steps context tests

Add corresponding tests and extend pkg/runner/expression.go vmSteps() to
handle steps context conclusion and outcome iota as strings.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Chore: add a snapshot target

* Update: support credentials for private containers

Resolves: #788

* fix: rework container credentials

Signed-off-by: hackercat <[email protected]>

* fix: check if Credentials are not nil

* fix: return on missing credentials key

Co-authored-by: hackercat <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: read docker credentials from local docker config

* fix: url.Parse requires protocol

Co-authored-by: Björn Brauer <[email protected]>

* fix: docker decides by the existence of . or : if...

... the image is in a custom registry or not.

Co-authored-by: Björn Brauer <[email protected]>

* fix: make docker hostname detection more robust

* test: mock docker config for getImagePullOptions test

By default github actions have a docker config set with a token to pull
images from docker hub.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
* ci(choco): fix action

Signed-off-by: hackercat <[email protected]>

* fix(editorconfig): force style for all files, fix typo

Signed-off-by: hackercat <[email protected]>

* ci(choco): test choco action

Signed-off-by: hackercat <[email protected]>

* fix(editorconfig): unformat Dockerfile/sh

Signed-off-by: hackercat <[email protected]>
* fix: continue jobs + steps after failure

To allow proper if expression handling on jobs and steps (like always,
success, failure, ...) we need to continue running all executors in
the prepared chain.
To keep the error handling intact we add an occurred error to the
go context and handle it later in the pipeline/chain.

Also we add the job result to the needs context to give expressions
access to it.
The needs object, failure and success functions are split between
run context (on jobs) and step context.

Closes #442

Co-authored-by: Björn Brauer <[email protected]>

* style: correct linter warnings

Co-authored-by: Björn Brauer <[email protected]>

* fix: job if value defaults to success()

As described in the documentation, a default value of "success()" is
applied when no "if" value is present on the job.

https://docs.github.com/en/actions/learn-github-actions/expressions#job-status-check-functions

Co-authored-by: Markus Wolf <[email protected]>

* fix: check job needs recursively

Ensure job result includes results of previous jobs

Co-authored-by: Markus Wolf <[email protected]>

* test: add runner test for job status check functions

Co-authored-by: Markus Wolf <[email protected]>

* test: add unit tests for run context if evaluation

Co-authored-by: Björn Brauer <[email protected]>

* refactor: move if expression evaluation

Move if expression evaluation into own function (step context) to
better support unit testing.

Co-authored-by: Björn Brauer <[email protected]>

* test: add unit tests for step context if evaluation

Co-authored-by: Markus Wolf <[email protected]>

* fix: handle job error more resilient

The job error is not stored in a context map instead of a context
added value.
Since context values are immutable an added value requires to keep
the new context in all cases. This is fragile since it might slip
unnoticed to other parts of the code.

Storing the error of a job in the context map will make it more stable,
since the map is always there and the context of the pipeline is stable
for the whole run.

* feat: steps should use a default if expression of success()

* test: add integration test for if-expressions

* chore: disable editorconfig-checker for yaml multiline string

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
> This special command allows you to log anything without accidentally running a workflow command.
https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#stopping-and-starting-workflow-commands

Example: https://github.com/ZauberNerd/act-test/runs/4469496818?check_suite_focus=true#step:8:10
* fix: clarify --reuse and --rm flags

Signed-off-by: hackercat <[email protected]>

* lint(editorconfig): ignore *.md due to mixed style

Signed-off-by: hackercat <[email protected]>
* fix: rework `setupShellCommand`

* move all logic to separate function so we can test that later
* split `step.Shell` and `step.WorkingDirectory` setup into own funcs
* general cleanup of function
* use `ActPath` to not collide with checked out repository
* use `shellquote.Split()` instead of `strings.Fields()` for better command split
* replace single string concat with `fmt`

Signed-off-by: hackercat <[email protected]>

* lint(editorconfig): ignore *_test.go due to mixed style

Signed-off-by: hackercat <[email protected]>
* ci: replace superlinter with megalinter

Signed-off-by: hackercat <[email protected]>

* fix: apply lint recommendations

Signed-off-by: hackercat <[email protected]>
* Feature: uses in composite

* Negate logic

* Reduce complexity

* Update step_context.go

* Update step_context.go

* Update step_context.go

* Fix syntax error in test

* Bump

* Disable usage of actions/setup-node@v2

* Bump

* Fix step id collision

* Fix output command workaround

* Make secrets context inaccessible in composite

* Fix order after adding a workaround (needs tests)

Fixes https://github.com/nektos/act/pull/793#issuecomment-922329838

* Evaluate env before passing one step deeper

If env would contain any inputs, steps ctx or secrets there was undefined behaviour

* [no ci] prepare secret test

* Initial test pass inputs as env

* Fix syntax error

* extend test also for direct invoke

* Fix passing provided env as composite output

* Fix syntax error

* toUpper 'no such secret', act has a bug

* fix indent

* Fix env outputs in composite

* Test env outputs of composite

* Fix inputs not defined in docker actions

* Fix interpolate args input of docker actions

* Fix lint

* AllowCompositeIf now defaults to true

see https://github.com/actions/runner/releases/tag/v2.284.0

* Fix lint

* Fix env of docker action.yml

* Test calling a local docker action from composite

With input context hirachy

* local-action-dockerfile Test pass on action/runner

It seems action/runner ignores overrides of args,
if the target docker action has the args property set.

* Fix exec permissions of docker-local-noargs

* Revert getStepsContext change

* fix: handle composite action on error and continue

This change is a follow up of https://github.com/nektos/act/pull/840
and integrates with https://github.com/nektos/act/pull/793

There are two things included here:

- The default value for a step.if in an action need to be 'success()'
- We need to hand the error from a composite action back to the
  calling executor

Co-authored-by: Björn Brauer <[email protected]>

* Patch inputs can be bool, float64 and string
for workflow_call
Also inputs is now always defined, but may be null

* Simplify cherry-picked commit

* Minor style adjustments

* Remove chmod +x from tests

now fails on windows like before

* Fix GITHUB_ACTION_PATH some action env vars

Fixes GITHUB_ACTION_REPOSITORY, GITHUB_ACTION_REF.

* Add comment to CompositeRestrictions

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: add node16 support

Signed-off-by: hackercat <[email protected]>

* feat: bump images to node16

Signed-off-by: hackercat <[email protected]>

* lint(editorconfig): ignore *.md due to mixed style

Signed-off-by: hackercat <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit moves the githubContext, jobContext and stepResult structs
from the runner package to the model package in preparation for #908
because the expression.go file lives in the runner package and would
introduce cyclic dependencies with the exprparser package.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: implement expression evaluator

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>

* feat: integrate exprparser into act

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>

* Escape { and }, do not fail on missing properties

* Fix empty inputs context

* fix: contains() comparison for complex values

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>
Co-authored-by: Christopher Homberger <[email protected]>
fix: conclusion and outcome after error with failure condition
fix: continue-on-error doesn't work correctly for composite actions
With this change `act` will try to populate the `githubContext.ref` and
`githubContext.sha` with values read from the event payload.

Caveats:
- `page_build` should not have a ref
- `status` should not have a ref
- `registry_package` should set the ref to the branch/tag but the
  payload isn't documented
- `workflow_call` should set ref to the same value as its caller but the
  payload isn't documented
- most of the events should set the sha to the last commit on the ref
  but unfortunately the sha is not always included in the payload,
  therefore we use the sha from the local git checkout

Co-Authored-By: Philipp Hinrichsen <[email protected]>

Co-authored-by: Philipp Hinrichsen <[email protected]>
Github sets the outcome and conclusion to skipped
and this PR does the same during the pipeline run for
the StepResults in act.

Co-authored-by: Björn Brauer <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Mathijs van Veluw <[email protected]>

Co-authored-by: Mathijs van Veluw <[email protected]>
* Fix: Regressions of run step after failure

* Add test, to enshure no panic

* Print error of failed step
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This splits the executor from the RunContext into its own function
called newJobExecutor.
We defined an interface called jobInfo which is implemented by the RunContext.
This enables better unit testing because only a small interface needs to
be mocked.

This is a preparation for implementing pre and post actions.

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: Jonas Holland <[email protected]>
Co-authored-by: Robert Kowalski <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: Jonas Holland <[email protected]>
Co-authored-by: Robert Kowalski <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>
This change extracts the functionality of reading an `action.y(a)ml` or
creation of a `(Synthetic Action)` into its own type to enable better
unit testing / mocking of those IO operations.

This is done in preparation for the implementation of pre/post action
support in act.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
* fix: always execute closeContainer() executor

During our earlier refactoring in #984 we accidentally changed the
behaviour in such a way that the `closeContainer()` executor was never
called.

This commit restores the earlier behaviour.

Ref:
* https://github.com/nektos/act/pull/984/files#diff-c057d66dc9657d8428e290c69871596e2b567bb8fecad62a99cab54398131a84L294
* https://github.com/nektos/act/pull/984/files#diff-ea9d5c93d769ef9b268932dd9990363e97fc3bec8a00114979d049bead5dd718R68

* test: add testcases to ensure job containers are started/stopped

This commit adds tests to ensure that the executors of `startContainer`,
`stopContainer`, `interpolateOutputs` and `closeContainer` are always
called in the correct order.
* fix: deep evaluate matrix strategy

* Try to make linter happy.

* Apply PR feedback, fix insert directive more tests

* Fix: logic error

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: default empty `if:` statement to `if: success()` in evaluator

Previously the code to default an empty `if:` statement in the yaml file
was implemented in different files in the model package.
Now an empty `if:` statement defaults to `success()` in the expression
evaluator.

* refactor: remove obsolete `FixIfStatement` functions

The introduction of the expression evaluator seems to have made these
functions obsolete, as the test case `TestRunEvent/issue-598` works even
without these functions.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
fixes https://github.com/nektos/act/issues/979
* refactor: remove debug error output

Errors should always be logged with an error level and not debug level.
Since the error is returned here, it will be logged later as an error.
Presumably this was a leftover from debugging the executor chain in:
PR: #971

* refactor: debug log wich expression is going to be evaluated

* fix: handle nil in EvalBool

We've seen this issue when the env map is not set-up properly,
i.e. when the env map is nil, EvalBool might return nil, which should
be handled as a falsy value.

* fix: fail on error in if expression and return the evaluation error

Stop running the workflow in case an expression cannot be evaluated.

Fixes: #1008

* fix: remove quotes from inside expression syntax in test

It looks like having an expression inside double quotes inside the
expression syntax is not valid: https://github.com/ZauberNerd/act-test/actions/runs/1881986429
The workflow is not valid. .github/workflows/test.yml (Line: 10, Col: 13): Unexpected symbol: '"endsWith'. Located at position 1 within expression: "endsWith('Hello world', 'ld')"

* refactor: export IsTruthy function from exprparser package

* refactor: use IsTruthy function in EvalBool

* refactor: move debug log for expression rewrite to rewrite function

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: run jobs in parallel

This changes fixes and restructures the parallel execution of jobs.
The previous changes limiting the parallel execution did break this
and allowed only one job in parallel.

While we run #CPU jobs in parallel now, the jobs added per job-matrix
add to this. So we might over-commit to the capacity, but at least
it is limited.

* fix: correctly build job pipeline

The job pipeline should just append all required pipeline steps.
The parallelism will be handled by the ParallelExecutor and we
shouldn't handle it during building the pipelines.

Also this adds a test, that the ParallelExecutor does run
a limited amount of parallel goroutines.

* test: correct test implementation

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
this commit adds support for the `::add-mask::` command, which was
implemented as a stub before.

it does not cover debug output that appears when you run act in
verbose mode

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>
fixes #985

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.1.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3.1.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: add json logger output

This will allow to format log output as json.
This is helpful in cases where act is not executed on a 'local' machine.

* refactor: use runner config

Using the runner config to configure logging is cleaner.

Co-authored-by: Casey Lee <[email protected]>
Co-Authored-By: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* feat: add step name to logger field

This change does add the step name to the logger fields. This does
not change the output for our users, but for the json logger, it
does make each step output traceable.

* fix: remove new logger

Since logrus and context both are immutable for our case, we
can just add a new field and store the logger in the context.

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
The function `WithTestContext` is never called in the project, and
there is just one usage of `TestContext`, inside one of our loggers

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
act has a feature that skips the checkout action to do a remote
checkout when a local checkout exists. in some cases, e.g. when
running act in a CI, you always want to clone the repository.
* Fix: tojson(null) == 'null'

* Update test

* Update functions_test.go
panic: reflect: call of reflect.Value.Interface on zero Value

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Fix: panic: reflect: slice index out of range

* Update interpreter.go

* [no ci] Return null for negative indexes

* Add tests for index access

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: add bug-report flag

* fix: use docker host CPU count

* feat: add config files to bug-report

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: split step_context into separate files

This commit moves functions from the step_context.go file into different
files, but does otherwise not change anything.
This is done to make it easier to review the changes made to these
functions in the next commit, where we introduce a step factory to
facilitate better unit testing of steps.

Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Robert Kowalski <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>
Co-authored-by: Jonas Holland <[email protected]>

* refactor: introduce step factory and make steps testable

With this commit we're introducing the `stepFactory` and interfaces
and implementations for each different kind of step (run, docker,
local and remote actions).
Separating each step kind into its own interface and implementation
makes it easier to reason about and to change behaviour of the step.

By introducing interfaces we enable better unit testability as now
each step implementation, the step factory and the job executor can
be tested on their own by mocking out parts that are irrelevant.

This commits prepares us for implementing pre/post actions in a
later PR.

Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Robert Kowalski <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>
Co-authored-by: Jonas Holland <[email protected]>

* fix: run post steps in reverse order

* test: add missing asserts for mocks

* refactor: use local reference instead of function

This may make code more easy to follow.

* refactor: correct typo in function name

* test: use named structs

* test: only expected valid calls

There are mocks which are only called on certain conditions.

* refactor: use step-model to get step name

Using the step-logger we have to get the logger name from the
step model.

* test: only mock stopContainer if required

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: Robert Kowalski <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>
Co-authored-by: Jonas Holland <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Christopher Homberger <[email protected]>
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
for when people don't specify version via -ldflags

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This change reduces the interfaces by removing
obsolete parameters from functions.
Obsolete parameters does not means unused ones, but
parameters which could be retrieved from other parameters
instead.

This should simplify logic and maintainability for these
functions.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <[email protected]>

Signed-off-by: Ryan <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: copy ignored tracked files

* fix

* refactor: Extract callback to fileCollector

fix: temporary tar archive not deletable on windows
fix: `.*` in gitignore ignores all files

* Move nolint: gocyclo

* pass context as parameter

* goimport

* Add fs interface + one test

* fix lint, also test for ignored non tracked file

* fix filename

* Apply suggestions from code review

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* don't merge env var if it exists already

* remove test workflow

* add some tests

* change mergeMaps order instead of checking for existence

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
fixes https://github.com/nektos/act/issues/1099
fixes https://github.com/nektos/act/issues/983

Signed-off-by: Ryan <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* implement volume mount for container job

* Update pkg/runner/run_context.go

Co-authored-by: Ryan <[email protected]>

* add tests for container volume mount options

* remove unused code

* prefer if-else instead of if-continue

* remove continue

* add some tests

Co-authored-by: Ryan <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Prevents random failing of all other runs when qemu binfmt
is not set up

Signed-off-by: Ryan <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* use new paths from goreleaser

* fix path from new goreleaser paths

* fix indent of .sh
This prevented JetBrains GoLand from recognising subtests and treated
it all as single big test, VSCode seems to be still broken in that regard

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
To make the test logs more readable, we should fold the
output per test into a group.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: conclusion and outcome are no integers

* Change Test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: support `_REF_NAME` & `_REF_TYPE`

* chore: fix `step_test::TestSetupEnv`

* fix: logic & test

* test: delete `GITHUB_REF_NAME`, `GITHUB_REF_TYPE`
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: remove composite action runcontext workaround

The RunContext is cloned to execute a composite action with all its
steps in a similar context. This required some workaround, since
the command handler has kept a reference to the original RunContext.

This is solved now, by replacing the docker LogWriter with a proper
scoped LogWriter.

This prepares for a simpler setup of composite actions to be able
to create and re-create the composite RunContext for pre/main/post
action steps.

* test: check env-vars for local js and docker actions

* test: test remote docker and js actions

* fix: merge github context into env when read and setup

* refacotr: simplify composite context setup

* test: use a map matcher to test input setup

* fix: restore composite log output

Since we create a new line writer, we need to log the raw_output as well.
Otherwise no output will be available from the log-writer

* fix: add RunContext JobName to fill GITHUB_JOBNAME

* test: use nektos/act-test-actions

* fix: allow masking values in composite actions

To allow masking of values from composite actions, we need
to use a custom job logger with a reference to the masked
values for the composite run context.

* refactor: keep existing logger for composite actions

To not introduce another new logger while still be able to use
the masking from the composite action, we add the masks to
the go context. To leverage that context, we also add the context
to the log entries where the valueMasker then could get the actual
mask values.

With this way to 'inject' the masked values into the logger, we do
- keep the logger
- keep the coloring
- stay away from inconsistencies due to parallel jobs

* fix: re-add removed color increase

This one should have never removed :-)

* fix: add missing ExtraPath attribute

* fix: merge run context env into composite run context env

This adds a test and fix for the parent environment. It should be
inherited by the composite environment.

* test: add missing test case

* fix: store github token next to secrets

We must not expose the secrets to composite actions, but the
`github.token` is available inside composite actions.
To provide this we store the token in the config and create it in
the GithubContext from there.

The token can be used with `github.token` but is not available as
`secrets.GITHUB_TOKEN`.

This implements the same behavior as on GitHub.

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Marcus Noll <[email protected]>

* fixup! fix: allow masking values in composite actions

* style: use tabs instead of spaces to fix linter errors

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Marcus Noll <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
I have a lot of stale act-....-env volumes

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
If a step does not have either a `run` or `uses` directive it is
considered invalid.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: panic if a step is a job is nil

* simplify

* [no ci] Add testdata

* [no ci] Add Test
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: connect to docker **after** checking configs

* feat: add vcs build info

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(editorconfig,megalinter): enforce space style

* ignore install.sh since it's auto-generated
* simplify editorconfig

* ci(choco): update chocolatey to 1.1.0

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: add post step to actions and add state command

This commit includes requried changes for running post steps
for local and remote actions.
This allows general cleanup work to be done after executing
an action.

Communication is allowed between this steps, by using the
action state.

* feat: collect pre and post steps for composite actions

* refactor: move composite action logic into own file

* refactor: restructure composite handling

* feat: run composite post steps during post step lifecycle

* refactor: remove duplicate log output

* feat: run all composite post actions in a step

Since composite actions could have multiple pre/post steps inside,
we need to run all of them in a single top-level pre/post step.

This PR includes a test case for this and the correct order of steps
to be executed.

* refactor: remove unused lines of code

* refactor: simplify test expression

* fix: use composite job logger

* fix: make step output more readable

* fix: enforce running all post executor

To make sure every post executor/step is executed, it is chained
with it's own Finally executor.

* fix: do not run post step if no step result is available

Having no step result means we do not run any step (neither pre
nor main) and we do not need to run post.

* fix: setup defaults

If no pre-if or post-if is given, it should default to 'always()'.
This could be set even if there is no pre or post step.
In fact this is required for composite actions and included post
steps to run.

* fix: output step related if expression

* test: update expectation

* feat: run pre step from actions (#1110)

This PR implements running pre steps for remote actions.
This includes remote actions using inside local composite actions.

* fix: set correct expr default status checks

For post-if conditions the default status check should be
always(), while for all other if expression the default status
check is success()

References:
https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if

* fix: remove code added during rebase
* feat: handle context cancelation during docker exec

To allow interrupting docker exec (which could be long running)
we process the log output in a go routine and handle
context cancelation as well as command result.

In case of context cancelation a CTRL+C is written into the docker
container. This should be enough to terminate the running
command.

To make sure we do not get stuck during cleanup, we do
set the cleanup contexts with a timeout of 5 minutes

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>

* feat: handle SIGTERM signal and abort run

* test: on context cancel, abort running command

This test makes sure that whenever the act Context was canceled, the
currently running docker exec is sent a 0x03 (ctrl+c).

Co-authored-by: Björn Brauer <[email protected]>

* test: make sure the exec funcction handles command exit code

This test makes sure that the exec function does handle
docker command error results

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Philipp Hinrichsen <[email protected]>
Co-authored-by: Björn Brauer <[email protected]>
* Update run_context.go

* .
* Update step_action_local.go

* Enable Tests for DRYRUN

* Update runner_test.go

* Update runner_test.go

* Move DRYRUN Test in it's own function

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
There might be use cases where users want to use GitHub's variables in
the environment variables, which is a valid use case.

This commits adds support for replacement of GitHub's env with GitHub's
values.

Signed-off-by: André Martins <[email protected]>
* fix: skip local actions pre step in any case

We should skip local actions pre step, as it is not supported by github.
In turn we may need to late prepare remote actions which are run
as steps in a local composite action.

Fixes #1193

* test: remove obsolete test case

Since local actions does not run any pre-step anymore we don't test this case.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: split out common/git

* refactor: move git options to separate func

* refactor: remove github.com/pkg/errors dependency

* fix(golangci-lint): forbid github.com/pkg/errors

* style: fix typo

* style: fix typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: use logger from context wherever possible

Co-authored-by: Markus Wolf <[email protected]>

* feat: add step/job id and results to json logs

Co-authored-by: Markus Wolf <[email protected]>

* test: value to be masked should not be hard-coded in the action

Co-authored-by: Markus Wolf <[email protected]>

* fix: replace values following ::add-mask:: in evaluated strings

Co-authored-by: Markus Wolf <[email protected]>

* feat: [DEBUG] identifier for debug logs to distinguish them

Co-authored-by: Markus Wolf <[email protected]>

* 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 <[email protected]>

* feat: add pre/post stage identifier fields to json log output

Co-authored-by: Markus Wolf <[email protected]>

* feat: add job/step result status to skipped steps/jobs

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Do not initialize inputs a second time (in pre and main step).
When the action setup already run during pre step, we must not
re-run it during the main step, otherwise the inputs will be
overwritten by possible other action inputs.
* Added tests for mid-size and big artifacts, reproducing a problem with chunked uploads.

* Added support for chunked uploads.

* Enforced overwriting uploaded artifacts on receiving the first chunk.

Co-authored-by: Casey Lee <[email protected]>
* Update run_context.go

* Update step_action_remote.go

* Update step_action_remote.go

* [no ci] eval path

* Update step_action_remote.go

* Update step_action_remote.go

* Update step_action_remote.go

Co-authored-by: Casey Lee <[email protected]>
* Update workflow.go

* Update workflow.go

* Update workflow.go

* Update workflow.go

* Update workflow.go

* Update workflow.go

* Add Tests

* Update workflow.go

* Modify Test

* use tabs

Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: non root user container

* Also chown WorkingDir

* .

* .

* Update docker_run.go

* Add Test

* Update runner_test.go

* Update docker_run.go

* Apply suggestions from code review

Co-authored-by: R <[email protected]>

* remove cruft from master merge

Co-authored-by: R <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
* feat(#1161): add --through-action to assigned actions from GitHub

* docs(flags): add --through-action and --through-action-token flags description

* test(action, remote): add test case for ThroughAction

* refactor(command): rename command from --through-action to --actions-from-github

* refactor(command): rename command from --actions-from-github to --replace-ghe-action-with-github-com
Container.CopyDir is no longer working with `\` as destpath.
This change stops act from rejecting valid entries such as

```
    timeout-minutes: ${{ matrix.runtime == 'v8' && 30 || 15 }}
```

at the job level.

This change complements the fix that was already in place
for the Step struct, done in #1217. See:

e35ab25fed

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: the number in the github event is of type number

The go %s formattig option outputs the type if the given
input value is not of type string.

* test: update test data as well

* fix: use floats
currently build fail with:

```
run golangci-lint
  Running [/home/runner/golangci-lint-1.47.0-linux-amd64/golangci-lint run --out-format=github-actions] in [] ...
  Error: G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server (gosec)
```

for example in this PR:
https://github.com/nektos/act/runs/7405009660?check_suite_focus=true

this sets the required ReadHeaderTimeout
* Made env interpolated instead of evaluated.

* [skip ci] Add Test Workflow file

* Activate Test

* fix Test

Co-authored-by: ChristopherHX <[email protected]>
when running nested composite actions, step ids were repeating
leading to errors in parsing the output. this patch adds the
parent step id to ste stepID field.

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* walk submodule path instead of dir name

* use file path instead of relative path

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This fixes an issue in the chain of post steps introduced
while updating the step-logger for composite actions.

It includes a test case so we make sure this does not happen
again.
* refactor: ignore already closed error

This hides the `file already cloesd` error as it is
distracting in the output and does not provide any value.

* refactor: use go errors

Co-authored-by: Casey Lee <[email protected]>
* support runner.arch

Signed-off-by: Fabian Kammel <[email protected]>

* add arch to runner definition

Signed-off-by: Fabian Kammel <[email protected]>

* get architecture from docker

Signed-off-by: Fabian Kammel <[email protected]>

* Update pkg/container/docker_run.go

Co-authored-by: ChristopherHX <[email protected]>

* lint: goimport file

Signed-off-by: Fabian Kammel <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Additionally close workflow file when a job name is invalid
Co-authored-by: Markus Wolf <[email protected]>
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Update action.go

* add Test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: crash on invalid docker credentials

* add test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: align github.ref to GitHub Action

The `github.ref` value should be `refs/heads/branch` in most cases.
There are a few exceptions handled by the code.

This change prefixes the default case with `refs/heads` and adds
tests for this and the excpetional cases.

* fix: correct existing assertions
For log processing of the JSON logs, we want to be able to know which
keys/values of the matrices were used.
This commit adds the current matrix map to the job logger.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
To be able to tag all log-lines with appropriate fields
after a workflow run is canceled, we need to restore
the JobLogger in the cancelation context.
* fix: show workflow info even if on.push is not defined (#1329)

To fix listing of workflows in such cases list/graph filtering was split with planning.

Now act supports one of the following list (-l)/graph (-g) cases:
* show all jobs of loaded workflows: act -l
* show specific job JOBNAME: act -l -j JOBNAME
* show jobs of loaded workflows in which event EVENTNAME is set up: act -l EVENTNAME
* show jobs of loaded workflows in which first defined workflow event is set up: act -l --detect-event

For planning it supports:
* running specific job JOBNAME with triggered event determined from:
** CLI argument: act -j JOBNAME EVENTNAME
** first defined in loaded workflows event: act -j  JOBNAME --detect-event
** only defined in loaded workflows event: act -j JOBNAME
** push event by default: act -j JOBNAME

*  running jobs of loaded workflows in which event is set up, event is determined from:
** CLI argument: act EVENTNAME
** first defined in loaded workflows event: act --detect-event
** only defined in loaded workflows event: act
** push event by default: act

Except #1329 this PR fixes #1332, #1318

* Update docs/help
* build(deps): bump megalinter/megalinter from 5 to 6.11.0

Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 5 to 6.11.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v5...v6.11.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: updates to support new megalinter

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Copy the matrix to make it closure aware
* test: add test case for #1319

* fix: setup of composite inputs

This change fixes the composite action setup handling of inputs.

All inputs are taken from the env now. The env is composed of
the 'level above'.
For example:
- step env -> taken from run context
- action env -> taken from step env
- composite env -> taken from action env

Before this change the env setup for steps, actions and composite
run contexts was harder to understand as all parts looked into
one of these: parent run context, step, action, composite run context.

Now the 'data flow' is from higher levels to lower levels which should
make it more clean.

Fixes #1319

* test: add simple remote composite action test

Since we don't have a remote composite test at all
before this, we need at least the simplest case.
This does not check every feature, but ensures basic
availability of remote composite actions.

* refactor: move ActionRef and ActionRepository

Moving ActionRef and ActionRepository from RunContext into the
step, allows us to remove the - more or less - ugly copy operations
from the RunContext.

This is more clean, as each step does hold the data required anyway
and the RunContext shouldn't know about the action details.

* refactor: remove unused properties
* 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>
This fixes the regression to interpolate input defaults which contain
expressions.
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.11.0 to 6.11.1.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.11.0...v6.11.1)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The env for remote composite actions need to be re-evaluated
at every stage (pre, main, post) as it is created during the
pre stage but there might be changes used as input to this
actions main stage (e.g. outputs for another action).

This is not required for local actions as their env is created
for the main stage (there is no pre stage).
Post stages do not need an updated env since they cannot recieve
inputs from other actions.
* test: add test for networking setup in act

This test makes sure that the hostname inside of act is resolvable.

* fix: only merge existing container options

When merging parsed container options without options being
set in a job, the default docker options are returned and
will override the expected defaults by act (e.g. network mode).

This is a first attempt to mitigate this behavior and only
merge settings if something was requested on a job.

* refactor: split config merging into own function

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Update push.yml

* Update main.yaml

* Update action.yml
* test: check workflow_dispatch inputs

This implements a test to check for `workflow_dispatch` inputs.
This will be a prerequisite for implementing the inputs.

* feat: map workflow_dispatch input to expression evaluator

This changes adds the workflow_dispatch event inputs
to the `inputs` context and maintaining the boolean type

* fix: coerce boolean input types

* fix: use step env if available, rc env otherwise
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.11.1 to 6.12.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.11.1...v6.12.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.12.0 to 6.13.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.12.0...v6.13.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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 <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This change does parse the different types of workflow jobs.
It is not much by itself but the start to implement reusable
workflows.

Relates to #826

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.13.0 to 6.14.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.13.0...v6.14.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: keep path to event json file in composite actions

The event.json paths need to be copied over, since it the
GithubContext is recreated from the composite RC. And that
does read some value for the event file if available.

* test: add test case

* test: paste the test correctly and revert a line

Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: set-state and set-output file commands

* increase test timeout from 10m to 15m

* Prepare for HostExecutor PR

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: interpolate the step names

Step names could contain expressions refering to event data.

Fixes #1353

* test: add missing mock data

* fix: setup composite expression evaluator

The RunContext does contain a cached ExpressionEvaluator.
This should be the case the composite RunContext as well.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/1
Co-authored-by: Lim Chun Leng <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.14.0 to 6.15.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.14.0...v6.15.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: pass LANG=C.UTF-8 to environment

Fixes: #1308

* fix: pass LANG=C.UTF-8 to environment in container only

Fixes: #1308
Signed-off-by: Brice Dutheil <[email protected]>

Signed-off-by: Brice Dutheil <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: move autoremove into the jobexecutor

breaking: docker container are removed after job exit

* reduce complexity

* remove linter exception

* reduce cyclic complexity

* fix: always allow 1 min for stopping and removing the runner, even if we were cancelled

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: `--container-options`

This deprecates the following options
- `--privileged`
- `--container-cap-add`
- `--container-cap-drop`
- `--container-architecture`
- `--userns`

* Merge binds/mounts, add desc

* avoid linter error

* fix: apply options to step env / deprecate warning

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: share UpdateFromEnv logic

* Add test for GITHUB_OUTPUT

Co-authored-by: Ben Randall <[email protected]>

* Add GITHUB_STATE test

* Add test for the old broken parser

Co-authored-by: Ben Randall <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: step env is unavailable in with property expr

* don't run the test on windows

* fix: composite action add missing shell

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Closes #1488
Remove overriding io.Stdout in TestMaskValues to prevent deadlock in GitHub Actions
* fix: add-path / GITHUB_PATH commands

* Disable old code

* fix: missing mock

* Update tests

* fix tests

* UpdateExtraPath skip on dryrun

* patch test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
fix https://gitea.com/gitea/act/issues/3

Signed-off-by: Bo-Yi.Wu <[email protected]>

Co-authored-by: Bo-Yi.Wu <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/4
* feat: allow to spawn and run a local reusable workflow

This change contains the ability to parse/plan/run a local
reusable workflow.
There are still numerous things missing:

- inputs
- secrets
- outputs

* feat: add workflow_call inputs

* test: improve inputs test

* feat: add input defaults

* feat: allow expressions in inputs

* feat: use context specific expression evaluator

* refactor: prepare for better re-usability

* feat: add secrets for reusable workflows

* test: use secrets during test run

* feat: handle reusable workflow outputs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: fix savestate in pre steps

* fix pre steps collision

* fix tests

* remove

* enable tests

* Update pkg/runner/action.go

* Rename InterActionState to IntraActionState

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Support "result" on "needs" context.

This change adds "result" to a job's "needs" context, as documented [here](https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context). `act` currently tracks the success/failure/cancelled status of a job, but does not include this value the `needs` context.

Fixes #1367

* Change `Needs` to use a new struct rather than the open type `interface{}`.

Related #1497
Fixes #1367

* Add integration test to "needs" context change.

Relates: #1497

* feat: allow to spawn and run a local reusable workflow (#1423)

* feat: allow to spawn and run a local reusable workflow

This change contains the ability to parse/plan/run a local
reusable workflow.
There are still numerous things missing:

- inputs
- secrets
- outputs

* feat: add workflow_call inputs

* test: improve inputs test

* feat: add input defaults

* feat: allow expressions in inputs

* feat: use context specific expression evaluator

* refactor: prepare for better re-usability

* feat: add secrets for reusable workflows

* test: use secrets during test run

* feat: handle reusable workflow outputs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* refactor: fix savestate in pre steps (#1466)

* refactor: fix savestate in pre steps

* fix pre steps collision

* fix tests

* remove

* enable tests

* Update pkg/runner/action.go

* Rename InterActionState to IntraActionState

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* fix: tail (not absolute) as entrypoint of job container (#1506)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix conflict in merge.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: align runner.os / runner.arch to known values

* .

* .

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 3 to 4.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: ci snaphot job

* revert: deprecation of containerArchitecture

This option isn't part of parsed docker cli flags

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.15.0 to 6.16.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.15.0...v6.16.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.16.0 to 6.17.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.16.0...v6.17.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Shouldn't provide token when cloning actions, the token comes from the instance which triggered the task, it might be not the instance which provides actions.

For GitHub, they are the same, always github.com. But for Gitea, tasks triggered by a.com can clone actions from b.com.

Reviewed-on: https://gitea.com/gitea/act/pulls/6
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-committed-by: Jason Song <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.17.0...v6.18.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: preserve job result state in case of failure

There is just one job field for the job result. This is also true for
matrix jobs. We need to preserve the failure state of a job to
have the whole job failing in case of one permuation of the matrix failed.

Closes #1518

* test: remove continue-on-error on job level

This feature is not yet supported by act and if implemented
would make this test invalid

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Since reusable workflows are defining inputs and ouputs using the
on.workflow_call syntax, this could also be triggered by a workflow_call
event. That event does not exist within GitHub and we should make
sure our worklow is not called by that kind of 'synthetic' event.

See https://github.com/nektos/act/pull/1423/files/74da5b085c0c4d08c5e5bf53501e555cb585b26c#r1042413431

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* test: define test case of path issues

Test case for #1528

* test: add multi arch grep

* fix: Always use current ExtraPath

* replace setup-node with run step

* Update push.yml

* yaml mistake

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: Allow building without docker support

* fix macos build tag

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit adds a new `LoadDockerAuthConfigs` function, which loads all
registry auths that are configured on the host and sends them with the build
command to the docker daemon.

This is needed in case act builds a docker action and the images referenced in
that docker action are located on private registries or otherwise require
authentication (e.g. to get a higher rate limit).

The code is adapted from how the docker cli works:
257ff41304/cli/command/image/build.go (L323-L332)

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
* fix: add-matcher fails github workflow

* make linter happy
* refactor: remove docker reference filter

* make it work

* solve logic failure

* Another mistake

* another one

* revert signature of ImageExistsLocally

It is better to keep two return values
* added input flags

* added input as part of the action event and added test cases

* updated readme

Co-authored-by: ChristopherHX <[email protected]>
* feat: add check for newer versions

* fix: support JSON logger and rever updates to go.mod

* fix: keep version updated in source code

* fix: lint errors

* fix: revert go.*
* Prior to this change, the artifact server always binds to the detected
  "outbound IP", breaks functionality when that IP is unroutable.
  For example, Zscaler assigns the host a local CGNAT address,
  100.64.0.1, which is unreachable from Docker Desktop.
* Add the `--artifact-server-addr` flag to allow override of the address
  to which the artifact server binds, defaulting to the existing
  behaviour.

Fixes: #1559
* build(deps): bump github.com/moby/buildkit from 0.10.6 to 0.11.0

Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.10.6 to 0.11.0.
- [Release notes](https://github.com/moby/buildkit/releases)
- [Commits](https://github.com/moby/buildkit/compare/v0.10.6...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: use new patternmatcher.Matches

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* 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
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: add remote reusable workflows

This changes adds cloning of a remote repository to
run a workflow included in it.

Closes #826

* fix: defer plan creation until clone is done

We need wait for the full clone (and only clone once)
before we start to plan the execution for a remote workflow

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
as title.

Signed-off-by: Bo-Yi.Wu <[email protected]>

Co-authored-by: Bo-Yi.Wu <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/8
Reviewed-by: Lunny Xiao <[email protected]>
Bumps [actions/github-script](https://github.com/actions/github-script) from 5 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: step summary of test results

* fix: indent style

* fix: handle failed tests

* fix upload / create a logs artifact

* Update checks.yml

* fix: always upload logs

* fix: run success

* Move steps into a composite action

* use args and not the hardcoded ones

* format composite action

* format
* test: Do not leak step env in composite

To prevent merging regressions.

* Update runner_test.go
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/9
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-committed-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/11
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
* feat: cache notices to reduce frequency of upgrade notifications

* fix: reduce WriteFile permissions

* fix: remove reference to deprecated lib

* fix: handle HTTP status 304
- Join relative path and split dockerfile off to get context

Signed-off-by: Aidan Jensen <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* allow overriding of GITHUB_ env variables

* bug fix for overriding env vars with empty string

* revert step.go

* refactor github_context to prevent lint failures. added more setters

* added ability to override github env variables

* handled base and head ref
* Update max container name length

Signed-off-by: Aidan Jensen <[email protected]>

* Use hashed name instead to prevent conflicts

Signed-off-by: Aidan Jensen <[email protected]>

---------

Signed-off-by: Aidan Jensen <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: GITHUB_ENV / PATH handling

* apply workaround

* add ctx to ApplyExtraPath

* fix: Do not leak step env in composite

See https://github.com/nektos/act/pull/1585 for a test

* add more tests

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.18.0 to 6.19.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.18.0...v6.19.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* build(deps): bump github.com/docker/cli

Bumps [github.com/docker/cli](https://github.com/docker/cli) from 23.0.0-rc.1+incompatible to 23.0.0+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v23.0.0-rc.1...v23.0.0)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* update-test

* update test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <[email protected]>
This allows testing actions with non standard dockerfile names

Signed-off-by: Aidan Jensen <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/12
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
Examples:

```yaml
jobs:
  my_first_job:
    steps:
      - name: My first step
        uses: https://gitea.com/actions/heroku@main
      - name: My second step
        uses: http://example.com/actions/[email protected]
```

Reviewed-on: https://gitea.com/gitea/act/pulls/14
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-committed-by: Jason Song <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* chore: Remove obsolete Container.UpdateFromPath

* remove unused import
Change planner functions to return errors

This enables createStages to return `unable to build dependency graph`

Fix PlanEvent to properly report errors relating to events/workflows
* feat: workflowpattern package

* nolint:gocyclo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: crash malformed composite action

* Add remote composite action test

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: map job output for reusable workflows

This fixes the job outputs for reusable workflows. There is
a required indirection. Before this we took the outputs from
all jobs which is not what users express with the workflow
outputs.

* fix: remove double evaluation

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fix #15.

Reviewed-on: https://gitea.com/gitea/act/pulls/16
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-committed-by: Jason Song <[email protected]>
Follow #16.

Reviewed-on: https://gitea.com/gitea/act/pulls/17
Follow #16 #17

Reviewed-on: https://gitea.com/gitea/act/pulls/18
* fix: github.job property is empty, GITHUB_JOB should be job id

fix: github.job property is empty #1621
fix: GITHUB_JOB should be the id not the name #1473

* fix linter problem.

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: compare properties of Invalid types

 fix: compare properties of Invalid types #1643

* fix linter problem

* Fix review comment
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.19.0 to 6.20.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.19.0...v6.20.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
relatd: https://gitea.com/gitea/act_runner/pulls/39
Reviewed-on: https://gitea.com/gitea/act/pulls/19
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
Co-committed-by: a1012112796 <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Allow `using: "go"` when unmarshalling YAML.
- Add `ActionRunsUsingGo` to returned errors.

Co-authored-by: Zettat123 <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/20
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
* fix: correct ref and ref_name

The ref in the GitHub context is always full qualified
(e.g. refs/heads/branch, refs/tags/v1).
The ref_name is the ref with the strippep prefix.
In case of pull_requests, this is the merge commit ref
(e.g. refs/pull/123/merge -> 123/merge).

* test: update test data
Close #21

I have tested this PR and run Go actions successfully on:
- Windows host
- Docker on Windows
- Linux host
- Docker on Linux

Before running Go actions, we need to make sure that Go has been installed on the host or the Docker image.

Reviewed-on: https://gitea.com/gitea/act/pulls/22
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
* Support for docker steps in host environment

* removed workdir changes
Conflicts:
	pkg/container/docker_run.go
	pkg/runner/action.go
	pkg/runner/logger.go
	pkg/runner/run_context.go
	pkg/runner/runner.go
	pkg/runner/step_action_remote_test.go
Reviewed-on: https://gitea.com/gitea/act/pulls/24
example:
https://gitea.com/a1012112796/test_action/actions/runs/7

![image](/attachments/a8931f2f-096f-41fd-8f9f-0c8322ee985a)

TODO: special handle them on ui

Signed-off-by: a1012112796 <[email protected]>

Reviewed-on: https://gitea.com/gitea/act/pulls/25
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
Co-committed-by: a1012112796 <[email protected]>
* added matrix option

* select the correct subset of matrix configuration after producing all the matrix configuration

* add tests

* update readme

* lint fix

* remove matrix from readme

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [fregante/setup-git-user](https://github.com/fregante/setup-git-user) from 1 to 2.
- [Release notes](https://github.com/fregante/setup-git-user/releases)
- [Commits](https://github.com/fregante/setup-git-user/compare/v1...v2)

---
updated-dependencies:
- dependency-name: fregante/setup-git-user
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.20.0 to 6.20.1.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.20.0...v6.20.1)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
At present, the runner can't run go actions even if the go environment has been set by the `setup-go` action. The reason is that `setup-go` will add the go related paths to [`GITHUB_PATH`](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path) but in #22 I forgot to apply them before running go actions. After adding the `ApplyExtraPath` function, the `setup-go` action runs properly.

Reviewed-on: https://gitea.com/gitea/act/pulls/26
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
And we will be able to use context like `${{ gitea.repository }}` in workflows yaml files, it's same as `${{ github.repository }}`

Reviewed-on: https://gitea.com/gitea/act/pulls/27
Reviewed-by: Zettat123 <[email protected]>
Fix gitea/act_runner#71

Reviewed-on: https://gitea.com/gitea/act/pulls/29
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Zettat123 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
See [act_runner #71 comment](https://gitea.com/gitea/act_runner/issues/71#issuecomment-733806), we need to handle `nil interface{}` in `ParseRawOn` function

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/28
Reviewed-by: Lunny Xiao <[email protected]>
Reviewed-by: appleboy <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/31
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
- Replace `go-git` with a forked version in `go.mod`

Signed-off-by: Bo-Yi.Wu <[email protected]>

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/30
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Bo-Yi.Wu <[email protected]>
Co-committed-by: Bo-Yi.Wu <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.20.1 to 6.21.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.20.1...v6.21.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This reverts commit 54d3c0b84c.

`EraseNeeds` Shouldn't be used in `jobparser.Parse`, it's for 023e61e678/models/actions/run.go (L200)

Or Gitea won't be able to get `Needs` of jobs.

Reviewed-on: https://gitea.com/gitea/act/pulls/32
Reviewed-by: Zettat123 <[email protected]>
Keep the order of jobs in the workflow file when parsing, and it will make it possible for Gitea to show jobs in the original order on UI.

Reviewed-on: https://gitea.com/gitea/act/pulls/33
Reviewed-by: Lunny Xiao <[email protected]>
* Make sure working directory is respected when configured from matrix

* Fix regression by setting Workingdirectory on stepRun instead of step or too early
Related to #33

Reviewed-on: https://gitea.com/gitea/act/pulls/35
Reviewed-by: Lunny Xiao <[email protected]>
Fix https://gitea.com/gitea/act_runner/issues/80
Fix https://gitea.com/gitea/act_runner/issues/85

To support reusable workflows, I made some improvements:
- read `yml` files from both `.gitea/workflows` and `.github/workflows`
- clone repository for local reusable workflows because the runner doesn't have the code in its local directory
- fix the incorrect clone url like `https://https://gitea.com`

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/34
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.21.0 to 6.22.1.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.21.0...v6.22.1)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Partially Fixes [gitea/act_runner#91 comment](https://gitea.com/gitea/act_runner/issues/91#issuecomment-734544)

nektos/act has added `With` to support reusable workflows (see [code](68c72b9a51/pkg/model/workflow.go (L160)))

GitHub actions also support [`jobs.<job_id>.with`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idwith)

Reviewed-on: https://gitea.com/gitea/act/pulls/37
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Partially fixes https://gitea.com/gitea/act_runner/issues/91

If the repository is private, we need to provide the token to the caller workflows to access the called reusable workflows from the same repository.

Reviewed-on: https://gitea.com/gitea/act/pulls/38
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Follow https://github.com/nektos/act/pull/1705

Reviewed-on: https://gitea.com/gitea/act/pulls/39
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-committed-by: Jason Song <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.22.1 to 6.22.2.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.22.1...v6.22.2)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: add `server_url` attribute to github context

The `server_urL` attribute was missing in the `github` context.
Previously it was exposed as environment variable only.

Closes #1726

* fix: also set `api_url` and `graphql_url` attributes
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: ghc assignment typo

* fixup server_url
Fix [#24039(GitHub)](https://github.com/go-gitea/gitea/issues/24039)

At present, if a job fails in the `Set up job`, the result status of the job will still be `success`. The reason is that the `pre` steps don't call `SetJobError`, so the `jobError` will be nil when `post` steps setting the job result. See 73d7678465/pkg/runner/job_executor.go (L99)

Reviewed-on: https://gitea.com/gitea/act/pulls/40
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Secrets can be passed to reusable workflows, either explicitly by key or
implicitly by `inherit`:

https://docs.github.com/en/actions/using-workflows/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow

Reviewed-on: https://gitea.com/gitea/act/pulls/41
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Galen Abell <[email protected]>
Co-committed-by: Galen Abell <[email protected]>
* support yaml env/secrets/inputs file

* Update root.go

* read the docs again..

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: common

* fix: in runner

* fix: decodeNode

* fix: GetMatrixes

* Revert "fix: common"

This reverts commit 6599803b6ae3b7adc168ef41b4afd4d89fc22f34.

* fix: GetOutboundIP

* test: fix cases

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
act defaults network mode to "host", but when `--container-options` are
passed on the CLI, it uses the docker CLI options parser, which fills
empty values with defaults, in which case network mode is set to
"default".
Unless the user explicitly sets `--container-options="--network=xxx"`,
we should always default to "host", to keep act's behaviour.

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: environment handling windows (host mode)

* fixup

* fixup

* add more tests

* fixup

* fix setenv

* fixes

* [skip ci] Apply suggestions from code review

Co-authored-by: Jason Song <[email protected]>

* Update side effects

---------

Co-authored-by: Jason Song <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Jason Song <[email protected]>
Replace #5

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/42
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Co-authored-by: Jason Song <[email protected]>
* fix: improve watchAndRun

* fix: lint

* fix: lint

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
related to: https://gitea.com/gitea/act_runner/issues/127

This PR make `act` support the expression like `${{ vars.YOUR_CUSTOM_VARIABLES }}`.

Reviewed-on: https://gitea.com/gitea/act/pulls/43
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
Fix the build failure in https://gitea.com/gitea/act_runner/actions/runs/278/jobs/0

Reviewed-on: https://gitea.com/gitea/act/pulls/44
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/45
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/47
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
```yml
jobs:
  job1:
    steps:
      - run: echo HelloWorld
      - # empty step
```

If a job contains an empty step, `Job.Steps` will have a nil element and will cause panic when calling `Step.String()`.

See [the code of gitea](948a9ee5e8/models/actions/task.go (L300-L301))

Reviewed-on: https://gitea.com/gitea/act/pulls/48
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Follow #48
Empty steps are invalid, so remove them when decoding `Job` from YAML.

Reviewed-on: https://gitea.com/gitea/act/pulls/49
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
This PR is to support overwriting the default `CMD` command of `services` containers.

This is a Gitea specific feature and GitHub Actions doesn't support this syntax.

Reviewed-on: https://gitea.com/gitea/act/pulls/50
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
* fix: try finding a socket, otherwise fail, respect user choice

* Update cmd/root.go

Co-authored-by: Jason Song <[email protected]>

* Update cmd/root.go

Co-authored-by: Jason Song <[email protected]>

---------

Co-authored-by: Jason Song <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Keep the order of `on` when parsing workflow, and fix the occasional unit test failure of `actions` like https://gitea.com/gitea/act/actions/runs/68

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/46
Reviewed-by: Lunny Xiao <[email protected]>
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
If a service's image is from a container registry requires authentication, `act_runner` will need `credentials` to pull the image, see [documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idcredentials).
Currently, `act_runner` incorrectly uses the `credentials` of `containers` to pull services' images and the `credentials` of services won't be used, see the related code: ba7ef95f06/pkg/runner/run_context.go (L228-L269)

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/51
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
* fix: rework docker socket changes

* fixup

* fixup

* fixes

* patch

* ...

* lint

* Fix docker outputs windows

* fix type

* Revert containerDaemonSocket breaking change

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* chore: run act from cli on linux

To prevent issues like #1756 in the future, we need to
run act from the cli through all the root setup code.
This ensures that the basic CLI setup can succeed.

Co-authored-by: Björn Brauer <[email protected]>

* chore: set platform spec to use

---------

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
* feat: port

* fix: use httprouter

* fix: WriteHeader

* fix: bolthold

* fix: bugs

* chore: one less file

* test: test handler

* fix: bug in id

* test: fix cases

* chore: tidy

* fix: use atomic.Int32

* fix: use atomic.Store

* feat: support close

* chore: lint

* fix: cache keys are case insensitive

* fix: options

* fix: use options

* fix: close

* fix: ignore close error

* Revert "fix: close"

This reverts commit d53ea7568ba03908eb153031c435008fd47e7ccb.

* fix: cacheUrlKey

* fix: nil close

* chore: lint code

* fix: test key

* test: case insensitive

* chore: lint
* fix filename for remote reusable workflow and remove hardcoded reference to github.com

* remove hardcoded reference to github.com for remote action
* fix: fallback to unauthenticated pull

* move logger def

* fixup

* add import

* .

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* refactor: EvaluateYamlNode do not alter nested nodes

* fix build error

* fix op

* fix lint

* ...

* fixup

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: don't allow `-self-hosted` mode as container image

* fix: jobcontainer in hostmode platform

* Update run_context.go

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: implement steps.timeout-minutes

* Add imports

* refactor code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Related to 441bf3e1a7

Reviewed-on: https://gitea.com/gitea/act/pulls/54
In [nektos/act/pull/1739](https://github.com/nektos/act/pull/1739), the container network mode defaults to `host` if the network option isn't specified in `options`.  When calling `ConnectToNetwork`, the `host` network mode may cause the error:
`Error response from daemon: container sharing network namespace with another container or host cannot be connected to any other network`
see the code: d2df2b0eeb/pkg/container/docker_run.go (L51-L68)

To avoid the error, this logic needs to be removed to keep the default network mode as `bridge`.

Reviewed-on: https://gitea.com/gitea/act/pulls/55
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
The runner's `privileged` config can be bypassed. Currently, even if the runner's `privileged` config is false, users can still enable the privileged mode by using `--privileged` in the container's option string. Therefore, if runner's config is false, the `--privileged` in options string should be ignored.

Reviewed-on: https://gitea.com/gitea/act/pulls/57
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Follow: https://gitea.com/gitea/act_runner/pulls/184
Close https://gitea.com/gitea/act_runner/issues/177

#### changes:
- `act` create new networks only if the value of `NeedCreateNetwork` is true, and remove these networks at last. `NeedCreateNetwork` is passed by `act_runner`. 'NeedCreateNetwork' is true only if  `container.network` in the configuration file of the `act_runner` is empty.
- In the `docker create` phase, specify the network to which containers will connect. Because, if not specify , container will connect to `bridge` network which is created automatically by Docker.
  - If the network is user defined network ( the value of `container.network` is empty or `<custom-network>`.  Because, the network created by `act` is also user defined network.), will also specify alias by `--network-alias`. The alias of service is `<service-id>`. So we can be access service container by `<service-id>:<port>` in the steps of job.
- Won't try to `docker network connect ` network after `docker start` any more.
  - Because on the one hand,  `docker network connect` applies only to user defined networks, if try to `docker network connect host <container-name>` will return error.
  - On the other hand, we just specify network in the stage of `docker create`, the same effect can be achieved.
- Won't try to remove containers and networks berfore  the stage of `docker start`, because the name of these containers and netwoks won't be repeat.

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/56
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.3...v3.1.4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 6.22.2 to 7.0.2.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v6.22.2...v7.0.2)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- Fix https://gitea.com/gitea/act_runner/issues/220
ignore `--network` and `--net` in `options`.
- Fix https://gitea.com/gitea/act_runner/issues/222
add opts of `mergo.WithAppendSlice` when excute `mergo.Merge()`.

Reviewed-on: https://gitea.com/gitea/act/pulls/59
Reviewed-by: Zettat123 <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.0.2 to 7.0.4.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.0.2...v7.0.4)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Partially resolve https://github.com/go-gitea/gitea/issues/24789.

`act_runner`  needs to be improved to parse `gitea_default_actions_url` after this PR merged (https://gitea.com/gitea/act_runner/pulls/200)

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/58
Reviewed-by: Lunny Xiao <[email protected]>
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
This PR adds a `ValidVolumes` config. Users can specify the volumes (including bind mounts) that can be mounted to containers by this config.

Options related to volumes:
- [jobs.<job_id>.container.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes)
- [jobs.<job_id>.services.<service_id>.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idvolumes)

In addition, volumes specified by `options` will also be checked.

Currently, the following default volumes (see f78a6206d3/pkg/runner/run_context.go (L116-L166)) will be added to `ValidVolumes`:
- `act-toolcache`
- `<container-name>` and `<container-name>-env`
- `/var/run/docker.sock` (We need to add a new configuration to control whether the docker daemon can be mounted)

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/60
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Related: https://gitea.com/gitea/act_runner/issues/189#issuecomment-740636
Refer to [Docker Doc](https://docs.docker.com/engine/reference/commandline/run/#volumes-from), the `--volumes-from` flag is used when running or creating a new container and takes the name or ID of the container from which you want to share volumes. Here's the syntax:
```
docker run --volumes-from <container_name_or_id> <image>
```
So put the job container name into the `env` context in this PR.

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/62
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
* Log incoming jobs.

Log the full contents of the job protobuf to make debugging jobs easier

* Ensure that the parallel executor always uses at least one thread.

The caller may mis-calculate the number of CPUs as zero, in which case
ensure that at least one thread is spawned.

* Use runtime.NumCPU for CPU counts.

For hosts without docker, GetHostInfo() returns a blank struct which
has zero CPUs and causes downstream trouble.

---------

Co-authored-by: Paul Armstrong <[email protected]>
Co-authored-by: Jason Song <[email protected]>
* feature: Add support for github action variables

* add --var flag for github variables

* unitests: Updated unittests to cover vars context.

* Remove syntax extension for vars and correct unit tests

* Update pkg/runner/expression.go

Co-authored-by: ChristopherHX <[email protected]>

---------

Co-authored-by: kuanyong-wong-partior <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.0.4 to 7.1.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.0.4...v7.1.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Because the upstream [PR](https://github.com/nektos/act/pull/1833) already supports variables, so this PR revert #43 (commit bc78c7964a), and cherry-pick commit [6ce45e3](6ce45e3f24).

Co-authored-by: Kuan Yong <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/66
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
by the way, export `ACT_SKIP_CHECKOUT` as a env verb for user to do some special config of local test.

example usage:

7a3ab0fdbc

Reviewed-on: https://gitea.com/gitea/act/pulls/63
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: a1012112796 <[email protected]>
Co-committed-by: a1012112796 <[email protected]>
* chore: trigger actions

* fix: use curl command directly

* fix: use node:16-buster

* fix: remove --fail-with-body

* chore: format codes
Adds an option to specify the directory below which actions
and host workspaces will be stored. If left empty the previous
location at $XDG_CACHE_HOME/act or $HOME/.cache/act will be used
respectively.

Co-authored-by: Casey Lee <[email protected]>
Adds an explicit config option to specify the directory
below which action contents will be cached. If left empty
the previous location at `$XDG_CACHE_HOME/act` or
`$HOME/.cache/act` will be used respectively.

Required to resolve gitea/act_runner#235

Co-authored-by: Marius Zwicker <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/65
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Marius Zwicker <[email protected]>
Co-committed-by: Marius Zwicker <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/67
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Follow #60

Reviewed-on: https://gitea.com/gitea/act/pulls/64
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
1. Newest act is not able to clone action based on --default-actions-url
It might be side effect of https://gitea.com/gitea/act/pulls/67.
2. Set correct server_url, api_url, graphql_url for act_runner exec

Reviewed-on: https://gitea.com/gitea/act/pulls/68
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Tomasz Duda <[email protected]>
Co-committed-by: Tomasz Duda <[email protected]>
Fixes https://gitea.com/gitea/act_runner/issues/255

Reviewed-on: https://gitea.com/gitea/act/pulls/69
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
Follow https://github.com/go-gitea/gitea/pull/25581 .

Reviewed-on: https://gitea.com/gitea/act/pulls/70
Fixes https://github.com/go-gitea/gitea/issues/25615

Reviewed-on: https://gitea.com/gitea/act/pulls/71
Co-authored-by: sati.ac <[email protected]>
Co-committed-by: sati.ac <[email protected]>
* refactor: open boltdb only while using it

* patch

* Update handler_test.go

* Update handler_test.go

* Update handler_test.go

* Update handler.go

* timeout * 10

* pr feedback

* fixup
* fix: update name template in goreleaser

* fix: add arm version

* fix: space

* fix: --clean

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Fixes https://gitea.com/gitea/act_runner/issues/277

Thanks @ChristopherHX for finding the cause of the bug.

Reviewed-on: https://gitea.com/gitea/act/pulls/74
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
* throw if `uses` is invalid

* update JobType to return error

* lint

* put //nolint:dupl on wrong test

* update error message to remove end punctuation

* lint

* update remote job type check

* move if statement

* rm nolint:dupl ... we'll see how that goes

---------

Co-authored-by: Casey Lee <[email protected]>
* updates to support newer version of docker sdk

Bumps [github.com/docker/cli](https://github.com/docker/cli) from 24.0.2+incompatible to 24.0.4+incompatible.
- [Commits](https://github.com/docker/cli/compare/v24.0.2...v24.0.4)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* feat: upgrade to go 1.20

* feat: upgrade to go 1.20

* chore: use go version from go.mod

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Since actions can specify the download source via a url prefix. The prefix may contain some sensitive information that needs to be stored in secrets or variable context, so we need to interpolate the expression value for`uses` firstly.

Reviewed-on: https://gitea.com/gitea/act/pulls/75
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
* Add new CLI flag to log just the job id and not the entire job name

* Up the action test timeout to 20m from 15m
Conflicts:
	cmd/input.go
	go.mod
	go.sum
	pkg/exprparser/interpreter.go
	pkg/model/workflow.go
	pkg/runner/expression.go
	pkg/runner/job_executor.go
	pkg/runner/runner.go
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/oxsecurity/megalinter/compare/v7.1.0...v7.2.1)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
dependency-type: direct:production
update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
* prefer pwsh on windows if found

prefer bash over sh if found

One windows test no longer defines a default shell to test if it's pwsh

* add dep

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The old Container input parameter was not flexible enough

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: CopyTarStream

Prepare for new process and thread safe action cache

* fix unused param

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* feat: Add new Action Cache

* fix some linter errors / warnings

* fix lint

* fix empty fpath parameter returns empty archive

* rename fpath to includePrefix
From the Go docs:

  "For a nil slice, the number of iterations is 0" [1]

Therefore, an additional nil check for `job.RunsOn()` before the loop is
unnecessary because `job.RunsOn()` returns a `[]string`.

[1]: https://go.dev/ref/spec#For_range

Signed-off-by: Eng Zer Jun <[email protected]>
The `--device` option would do platform-dependent validation, but the
OS was not passed as an argument. When a user added the `--device` option
to the container, it would result in a "Unknown server OS" error.
add podman user socket

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.2.1 to 7.3.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.2.1...v7.3.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: fail if no stages were found

Adds a warning message if act is cannot find any stages to run
with the filters provided.

Reproduction:
- run `act -j gibberish`

Desired behavior: some indication I did something silly
Actual behavior: no output, just exit with success.

As a human who often makes spelling mistakes,
it would be nice if act warned me what I was doing that was silly
rather than exiting apparently doing
nothing with no obvious indication
I did something wrong.

* Revert "fix: fail if no stages were found"

This reverts commit 226adf1c15cf4c01d516a05dc923507e6999978d.

* fix: fail if no stages were found

Errors if no stages were found with the given filters.
Prints out a helpful error message, pointing users
in the right place for how to specify which stage to run.

Reproduction:
- run `act -j gibberish`

Desired behavior: some indication I did something silly
Actual behavior: no output, just exit with success.

As a human who often makes spelling mistakes,
it would be nice if act warned me what I was doing that was silly
rather than exiting apparently doing
nothing with no obvious indication
I did something wrong.
* feat: support node20

* fix

* more fixes

* maybe final fixes?

* format
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4 to 5.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.3.0 to 7.4.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.3.0...v7.4.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
ubuntu 22.04 based large image is now available

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: use actions/runner hashfiles in container

Previously hashfiles ran on the host,
this don't work for container generated content

* fix: lint

* fix: lint

* fix assign follow symlink flag

Co-authored-by: Jason Song <[email protected]>

---------

Co-authored-by: Jason Song <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/79
Reviewed-by: John Olheiser <[email protected]>
Format floats the same way as actions/runner (precision 15, remove
trailing zeroes)

See: 67d70803a9/src/Sdk/DTObjectTemplating/ObjectTemplating/Tokens/NumberToken.cs (L34)
* Support services (#42)

Removed createSimpleContainerName and AutoRemove flag

Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/42
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Support services options (#45)

Reviewed-on: https://gitea.com/gitea/act/pulls/45
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Support intepolation for `env` of `services` (#47)

Reviewed-on: https://gitea.com/gitea/act/pulls/47
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Support services `credentials` (#51)

If a service's image is from a container registry requires authentication, `act_runner` will need `credentials` to pull the image, see [documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idcredentials).
Currently, `act_runner` incorrectly uses the `credentials` of `containers` to pull services' images and the `credentials` of services won't be used, see the related code: ba7ef95f06/pkg/runner/run_context.go (L228-L269)

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/51
Reviewed-by: Jason Song <[email protected]>
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Add ContainerMaxLifetime and ContainerNetworkMode options

from: 1d92791718

* Fix container network issue (#56)

Follow: https://gitea.com/gitea/act_runner/pulls/184
Close https://gitea.com/gitea/act_runner/issues/177

- `act` create new networks only if the value of `NeedCreateNetwork` is true, and remove these networks at last. `NeedCreateNetwork` is passed by `act_runner`. 'NeedCreateNetwork' is true only if  `container.network` in the configuration file of the `act_runner` is empty.
- In the `docker create` phase, specify the network to which containers will connect. Because, if not specify , container will connect to `bridge` network which is created automatically by Docker.
  - If the network is user defined network ( the value of `container.network` is empty or `<custom-network>`.  Because, the network created by `act` is also user defined network.), will also specify alias by `--network-alias`. The alias of service is `<service-id>`. So we can be access service container by `<service-id>:<port>` in the steps of job.
- Won't try to `docker network connect ` network after `docker start` any more.
  - Because on the one hand,  `docker network connect` applies only to user defined networks, if try to `docker network connect host <container-name>` will return error.
  - On the other hand, we just specify network in the stage of `docker create`, the same effect can be achieved.
- Won't try to remove containers and networks berfore  the stage of `docker start`, because the name of these containers and netwoks won't be repeat.

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/56
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>

* Check volumes (#60)

This PR adds a `ValidVolumes` config. Users can specify the volumes (including bind mounts) that can be mounted to containers by this config.

Options related to volumes:
- [jobs.<job_id>.container.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes)
- [jobs.<job_id>.services.<service_id>.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idvolumes)

In addition, volumes specified by `options` will also be checked.

Currently, the following default volumes (see f78a6206d3/pkg/runner/run_context.go (L116-L166)) will be added to `ValidVolumes`:
- `act-toolcache`
- `<container-name>` and `<container-name>-env`
- `/var/run/docker.sock` (We need to add a new configuration to control whether the docker daemon can be mounted)

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/60
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Remove ContainerMaxLifetime; fix lint

* Remove unused ValidVolumes

* Remove ConnectToNetwork

* Add docker stubs

* Close docker clients to prevent file descriptor leaks

* Fix the error when removing network in self-hosted mode (#69)

Fixes https://gitea.com/gitea/act_runner/issues/255

Reviewed-on: https://gitea.com/gitea/act/pulls/69
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>

* Move service container and network cleanup to rc.cleanUpJobContainer

* Add --network flag; default to host if not using service containers or set explicitly

* Correctly close executor to prevent fd leak

* Revert to tail instead of full path

* fix network duplication

* backport networkingConfig for aliaes

* don't hardcode netMode host

* Convert services test to table driven tests

* Add failing tests for services

* Expose service container ports onto the host

* Set container network mode in artifacts server test to host mode

* Log container network mode when creating/starting a container

* fix: Correctly handle ContainerNetworkMode

* fix: missing service container network

* Always remove service containers

Although we usually keep containers running if the workflow errored
(unless `--rm` is given) in order to facilitate debugging and we have
a flag (`--reuse`) to always keep containers running in order to speed
up repeated `act` invocations, I believe that these should only apply
to job containers and not service containers, because changing the
network settings on a service container requires re-creating it anyway.

* Remove networks only if no active endpoints exist

* Ensure job containers are stopped before starting a new job

* fix: go build -tags WITHOUT_DOCKER

---------

Co-authored-by: Zettat123 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-authored-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: ZauberNerd <[email protected]>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.4.0 to 7.5.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.4.0...v7.5.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/81
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <[email protected]>
* Support array expressions in runs-on

* Simplify appproach to use EvaluateYamlNode, fix case-sensitivity bug

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This needs to be explicitly in the `env` to be consistent with GitHub

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
network-scoped alias is supported only for containers in user defined networks

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Raffael Sahli <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: ChristopherHX <[email protected]>
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.5.0 to 7.6.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.5.0...v7.6.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.6.0 to 7.7.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.6.0...v7.7.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* fix: IsHost is defined as false on windows

* Update docker_run.go

* Update docker_run.go
Move the logging back up a level to fix a minor logging issue introduced in #2088

`RunContext`s for composite actions have dummy/blank `Job`s with no `runs-on`,
meaning their calls to `withGithubEnv` would result in an inaccurate log message
complaining that `'runs-on' key not defined in ...`

Co-authored-by: Jason Song <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Raffael Sahli <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
NetBSD can run Docker CLI and then use Docker on some remote machine
via DOCKER_HOST.

(This can be probably extended to all other Unix-es capable of running
just Docker CLI.)

Co-authored-by: ChristopherHX <[email protected]>
* Enable the new action cache

* fix

* fix: CopyTarStream (Docker)

* suppress panic in test

* add a cli option for opt in

* fixups

* add package

* fix

* rc.Config nil in test???

* add feature flag

* patch

* Fix respect --action-cache-path

Co-authored-by: Björn Brauer <[email protected]>

* add remote reusable workflow to ActionCache

* fixup

---------

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Add: Actions Offline Mode

* Add: Actions Offline Mode

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Match cache restore-keys in creation reverse order

* Match full prefix when selecting cache

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* WorkflowDispatchConfig supports ScalarNode and SequenceNode yaml node kinds

* Avoid using log.Fatal

* package slices is not in golang 1.20

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [megalinter/megalinter](https://github.com/megalinter/megalinter) from 7.7.0 to 7.8.0.
- [Release notes](https://github.com/megalinter/megalinter/releases)
- [Changelog](https://github.com/oxsecurity/megalinter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/megalinter/megalinter/compare/v7.7.0...v7.8.0)

---
updated-dependencies:
- dependency-name: megalinter/megalinter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prior to this commit, `parseEnvs` accept two parameters:

  1. env []string
  2. envs map[string]string

`parseEnvs` then do a `nil` check for `env`. However, we never pass a
`nil` `env` to `parseEnvs` in `newRunCommand`.

This commit simplify the `parseEnvs` function to accept just one
`env []string` parameter and return the result as `map[string]string`
instead.

Signed-off-by: Eng Zer Jun <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- include repoURL and repoRef in error
- map NoErrAlreadyUptodate to `couldn't find remote ref` for branchOrtag
  fetch request

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Signed-off-by: Josh Soref <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* refactor: filecollector into new package

* Add test for symlinks

* add test fix bug of GetContainerArchive

* add test data
The toolcache on GitHub Actions need to be in
/opt/hostedtoolcache. This is the case for all
environment variables set by act, but it's not the
case for the volume mounted into the container.

Co-authored-by: Björn Brauer <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Reviewed-on: https://gitea.com/gitea/act/pulls/90
Partial implementation of https://gitea.com/gitea/act_runner/issues/445, the Gitea side also needs a PR for the entire functionality.
Gitea side: https://github.com/go-gitea/gitea/pull/29468

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: https://gitea.com/gitea/act/pulls/91
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: sillyguodong <[email protected]>
Co-committed-by: sillyguodong <[email protected]>
This PR let "general" container config to be propagated to each job container.

See:
- https://gitea.com/gitea/act_runner/issues/265#issuecomment-744382
- https://gitea.com/gitea/act_runner/issues/79
- https://gitea.com/gitea/act_runner/issues/378

Reviewed-on: https://gitea.com/gitea/act/pulls/80
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Claudio Nicora <[email protected]>
Co-committed-by: Claudio Nicora <[email protected]>
Related to https://github.com/go-gitea/gitea/issues/28693

Reviewed-on: https://gitea.com/gitea/act/pulls/92
Reviewed-by: Jason Song <[email protected]>
Co-authored-by: Zettat123 <[email protected]>
Co-committed-by: Zettat123 <[email protected]>
act PR https://github.com/nektos/act/pull/1682

* shell script to start the LXC container
* create and destroy a LXC container
* run commands with lxc-attach
* expose additional devices for docker & libvirt to work
* install node 16 & git for checkout to work

[FORGEJO] start/stop lxc working directory is /tmp

[FORGEJO] use lxc-helpers to create/destroy containers

[FORGEJO] do not setup LXC

(cherry picked from commit 5b94ff3226848791b93e72d2e0f0ee4bba29a989)

Conflicts:
	pkg/container/host_environment.go

Conflicts:
	pkg/container/host_environment.go

[FORGJEO] upgrade to node20
Since the start script may create LXC templates that are shared, they
may race against each other when running for the first time. A lock
global to the host needs to be used to guarantee that does not happen.
Implements one part of forgejo/runner#119. The other part is a corresponding PR in forgejo/runner: forgejo/runner#120.

Reviewed-on: forgejo/act#24
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: s3lph <[email protected]>
Co-committed-by: s3lph <[email protected]>
It is a breaking change.

This reverts commit d2b2ed2d66.
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
Reviewed-on: forgejo/act#35
Reviewed-by: twenty-panda <[email protected]>
Reviewed-by: Michael Kriese <[email protected]>
I left gitea for backwards compatibility

Reviewed-on: forgejo/act#37
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: TheFox0x7 <[email protected]>
Co-committed-by: TheFox0x7 <[email protected]>
Reviewed-on: forgejo/act#39
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#41
Reviewed-on: forgejo/act#45
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#50
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#54
Reviewed-by: Michael Kriese <[email protected]>
Closes forgejo/runner#295
Reviewed-on: forgejo/act#58
Reviewed-by: Michael Kriese <[email protected]>
Closes forgejo/runner#307
Reviewed-on: forgejo/act#59
Reviewed-by: Michael Kriese <[email protected]>
* To take effect artifacts v4 pr is needed with adjusted claims

(cherry picked from commit c606759e8c0c2d5036c5bb15d7ec87beca1150cf)
* 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)
* 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)
Reviewed-on: forgejo/act#60
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.
This allows the Forgejo runner to obtain the job result from the
logs even when it is not in debug mode.
Reviewed-on: forgejo/act#67
Reviewed-by: Michael Kriese <[email protected]>
Reviewed-on: forgejo/act#68
Reviewed-by: earl-warren <[email protected]>
remove a failed test verifying exposed port which are not used in the
Forgejo runner anyway
Reviewed-on: forgejo/act#86
Reviewed-by: Michael Kriese <[email protected]>
Commit 5a351d33df has introduced a
regression due to which copyDir() would fail after closing the archive
successfully

Signed-off-by: Vitaliy Potyarkin <[email protected]>
Reviewed-on: forgejo/act#87
Reviewed-by: Michael Kriese <[email protected]>
- upgrade to [email protected]
- 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
Reviewed-on: forgejo/act#84
Reviewed-on: forgejo/act#88
Reviewed-by: Michael Kriese <[email protected]>
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 <[email protected]>
Reviewed-on: forgejo/act#90
Reviewed-by: earl-warren <[email protected]>
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.
The workflow can only contain the following options for a container:

- --volume
- --tmpfs
Reviewed-on: forgejo/act#92
Reviewed-by: Michael Kriese <[email protected]>
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: forgejo/act#95
Reviewed-by: Kwonunn <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
That creates false negative in test runs. Just keep one, there is no
value in having more.
Reviewed-on: forgejo/act#97
Reviewed-by: Michael Kriese <[email protected]>
- Closes #69
- #45
- https://codeberg.org/forgejo/forgejo/issues/6069

Reviewed-on: forgejo/act#70
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Michael Kriese <[email protected]>
Co-committed-by: Michael Kriese <[email protected]>
Upgrade to lxc-helper 1.0.1
Reviewed-on: forgejo/act#102
Reviewed-by: Michael Kriese <[email protected]>
Reviewed-on: forgejo/act#107
* During get/upload, close the database while reading/writing so
  it does not stay open for longer than necessary. This may be helpful
  when uploads run in parallel.
* Be more informative when returning error 500
* Make useCache handle errors
* Return 500 immediately when writing the cache fails instead of falling
  through to 200

Refs: #509
Reviewed-on: forgejo/act#109
Reviewed-by: Kwonunn <[email protected]>
This PR is a carryover from [upstream](https://github.com/nektos/act/pull/2422):

> github actions reports RUNNER_OS for linux and windows with [capital letters](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/variables#default-environment-variables) (Linux, Windows). This should increase compatibility when runner uses `-self-hosted`
>
> Currently, when workflows are run within containers, RUNNER_OS is [hardcoded](https://code.forgejo.org/forgejo/act/search/branch/main?path=&q=RUNNER_OS&mode=exact) to `Linux` correctly, so this will make RUNNER_OS more consistent.

Reviewed-on: forgejo/act#106
Reviewed-by: Michael Kriese <[email protected]>
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: benniekiss <[email protected]>
Co-committed-by: benniekiss <[email protected]>
Reviewed-on: forgejo/act#115
Reviewed-by: earl-warren <[email protected]>
* Try fetch update of the action, otherwise use cached version

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Reviewed-on: forgejo/act#117
Reviewed-by: earl-warren <[email protected]>
Reviewed-by: Michael Kriese <[email protected]>
Signed-off-by: thirdkeyword <[email protected]>
(cherry picked from commit 71ae39085eb9ed060ac55b45e55147489faaefa2)
* fix: rootless permission bits (new actions cache)

* add test

* fix lint / more tests

(cherry picked from commit d8fc9bade3403d72f4d5a47e103660b462630f48)
Reviewed-on: forgejo/act#133
Otherwise it may get rate limited in the CI verifying it works
Reviewed-on: forgejo/act#120
Reviewed-by: Michael Kriese <[email protected]>
Reviewed-by: limiting-factor <[email protected]>
Reviewed-on: forgejo/act#122
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#125
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#93
Reviewed-by: Michael Kriese <[email protected]>
This ensures that brackets are added for IPv6 addresses.
Without this, This could result in addresses like "2001:db8::1:3456",
which - obviously - would break further down and prevent the server from
starting.

Signed-off-by: Christoph Heiss <[email protected]>
Signed-off-by: majorteach <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Reviewed-on: forgejo/act#138
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#139
Reviewed-by: earl-warren <[email protected]>
Reviewed-on: forgejo/act#135
Reviewed-by: earl-warren <[email protected]>
* fix: remove local cache if remote is changed
* test: TestCloneIfRequired

https://github.com/nektos/act/pull/2284

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: forgejo/act#142
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: achyrva <[email protected]>
Co-committed-by: achyrva <[email protected]>
https://github.com/nektos/act/pull/2274
https://github.com/nektos/act/pull/2276
https://github.com/nektos/act/pull/2279
Co-authored-by: lvyaoting <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: ChristopherHX <[email protected]>
Reviewed-on: forgejo/act#143
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: achyrva <[email protected]>
Co-committed-by: achyrva <[email protected]>
Reviewed-on: forgejo/act#146
Reviewed-by: earl-warren <[email protected]>
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/docker/cli](https://github.com/docker/cli) | require | major | `v25.0.7+incompatible` -> `v28.2.2+incompatible` |

---

### Release Notes

<details>
<summary>docker/cli (github.com/docker/cli)</summary>

### [`v28.2.2+incompatible`](https://github.com/docker/cli/compare/v28.2.1...v28.2.2)

[Compare Source](https://github.com/docker/cli/compare/v28.2.1...v28.2.2)

### [`v28.2.1+incompatible`](https://github.com/docker/cli/compare/v28.2.0...v28.2.1)

[Compare Source](https://github.com/docker/cli/compare/v28.2.0...v28.2.1)

### [`v28.2.0+incompatible`](https://github.com/docker/cli/compare/v28.1.1...v28.2.0)

[Compare Source](https://github.com/docker/cli/compare/v28.1.1...v28.2.0)

### [`v28.1.1+incompatible`](https://github.com/docker/cli/compare/v28.1.0...v28.1.1)

[Compare Source](https://github.com/docker/cli/compare/v28.1.0...v28.1.1)

### [`v28.1.0+incompatible`](https://github.com/docker/cli/compare/v28.0.4...v28.1.0)

[Compare Source](https://github.com/docker/cli/compare/v28.0.4...v28.1.0)

### [`v28.0.4+incompatible`](https://github.com/docker/cli/compare/v28.0.3...v28.0.4)

[Compare Source](https://github.com/docker/cli/compare/v28.0.3...v28.0.4)

### [`v28.0.3+incompatible`](https://github.com/docker/cli/compare/v28.0.2...v28.0.3)

[Compare Source](https://github.com/docker/cli/compare/v28.0.2...v28.0.3)

### [`v28.0.2+incompatible`](https://github.com/docker/cli/compare/v28.0.1...v28.0.2)

[Compare Source](https://github.com/docker/cli/compare/v28.0.1...v28.0.2)

### [`v28.0.1+incompatible`](https://github.com/docker/cli/compare/v28.0.0...v28.0.1)

[Compare Source](https://github.com/docker/cli/compare/v28.0.0...v28.0.1)

### [`v28.0.0+incompatible`](https://github.com/docker/cli/compare/v27.5.1...v28.0.0)

[Compare Source](https://github.com/docker/cli/compare/v27.5.1...v28.0.0)

### [`v27.5.1+incompatible`](https://github.com/docker/cli/compare/v27.5.0...v27.5.1)

[Compare Source](https://github.com/docker/cli/compare/v27.5.0...v27.5.1)

### [`v27.5.0+incompatible`](https://github.com/docker/cli/compare/v27.4.1...v27.5.0)

[Compare Source](https://github.com/docker/cli/compare/v27.4.1...v27.5.0)

### [`v27.4.1+incompatible`](https://github.com/docker/cli/compare/v27.4.0...v27.4.1)

[Compare Source](https://github.com/docker/cli/compare/v27.4.0...v27.4.1)

### [`v27.4.0+incompatible`](https://github.com/docker/cli/compare/v27.3.1...v27.4.0)

[Compare Source](https://github.com/docker/cli/compare/v27.3.1...v27.4.0)

### [`v27.3.1+incompatible`](https://github.com/docker/cli/compare/v27.3.0...v27.3.1)

[Compare Source](https://github.com/docker/cli/compare/v27.3.0...v27.3.1)

### [`v27.3.0+incompatible`](https://github.com/docker/cli/compare/v27.2.1...v27.3.0)

[Compare Source](https://github.com/docker/cli/compare/v27.2.1...v27.3.0)

### [`v27.2.1+incompatible`](https://github.com/docker/cli/compare/v27.2.0...v27.2.1)

[Compare Source](https://github.com/docker/cli/compare/v27.2.0...v27.2.1)

### [`v27.2.0+incompatible`](https://github.com/docker/cli/compare/v27.1.2...v27.2.0)

[Compare Source](https://github.com/docker/cli/compare/v27.1.2...v27.2.0)

### [`v27.1.2+incompatible`](https://github.com/docker/cli/compare/v27.1.1...v27.1.2)

[Compare Source](https://github.com/docker/cli/compare/v27.1.1...v27.1.2)

### [`v27.1.1+incompatible`](https://github.com/docker/cli/compare/v27.1.0...v27.1.1)

[Compare Source](https://github.com/docker/cli/compare/v27.1.0...v27.1.1)

### [`v27.1.0+incompatible`](https://github.com/docker/cli/compare/v27.0.3...v27.1.0)

[Compare Source](https://github.com/docker/cli/compare/v27.0.3...v27.1.0)

### [`v27.0.3+incompatible`](https://github.com/docker/cli/compare/v27.0.2...v27.0.3)

[Compare Source](https://github.com/docker/cli/compare/v27.0.2...v27.0.3)

### [`v27.0.2+incompatible`](https://github.com/docker/cli/compare/v27.0.1...v27.0.2)

[Compare Source](https://github.com/docker/cli/compare/v27.0.1...v27.0.2)

### [`v27.0.1+incompatible`](https://github.com/docker/cli/compare/v26.1.5...v27.0.1)

[Compare Source](https://github.com/docker/cli/compare/v26.1.5...v27.0.1)

### [`v26.1.5+incompatible`](https://github.com/docker/cli/compare/v26.1.4...v26.1.5)

[Compare Source](https://github.com/docker/cli/compare/v26.1.4...v26.1.5)

### [`v26.1.4+incompatible`](https://github.com/docker/cli/compare/v26.1.3...v26.1.4)

[Compare Source](https://github.com/docker/cli/compare/v26.1.3...v26.1.4)

### [`v26.1.3+incompatible`](https://github.com/docker/cli/compare/v26.1.2...v26.1.3)

[Compare Source](https://github.com/docker/cli/compare/v26.1.2...v26.1.3)

### [`v26.1.2+incompatible`](https://github.com/docker/cli/compare/v26.1.1...v26.1.2)

[Compare Source](https://github.com/docker/cli/compare/v26.1.1...v26.1.2)

### [`v26.1.1+incompatible`](https://github.com/docker/cli/compare/v26.1.0...v26.1.1)

[Compare Source](https://github.com/docker/cli/compare/v26.1.0...v26.1.1)

### [`v26.1.0+incompatible`](https://github.com/docker/cli/compare/v26.0.2...v26.1.0)

[Compare Source](https://github.com/docker/cli/compare/v26.0.2...v26.1.0)

### [`v26.0.2+incompatible`](https://github.com/docker/cli/compare/v26.0.1...v26.0.2)

[Compare Source](https://github.com/docker/cli/compare/v26.0.1...v26.0.2)

### [`v26.0.1+incompatible`](https://github.com/docker/cli/compare/v26.0.0...v26.0.1)

[Compare Source](https://github.com/docker/cli/compare/v26.0.0...v26.0.1)

### [`v26.0.0+incompatible`](https://github.com/docker/cli/compare/v25.0.7...v26.0.0)

[Compare Source](https://github.com/docker/cli/compare/v25.0.7...v26.0.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40OC40IiwidXBkYXRlZEluVmVyIjoiNDAuNDguNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#147
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Currently the only way to get pre and post actions is to go through the nodejs mechanism, which is quite wasteful when all one wants to do is run a couple of shell commands, I'm trying to get around this with this patch.

It works similar to the node* actions in that it supports `pre`, `main` and `post`.

It is different in that these strings are passed to the system shell using `sh -c` and execute similar to the composite run action with the shell set to `sh`.

Example action to make use of this patch: https://codeberg.org/slatian/test-action/src/branch/main/action.yaml

Reviewed-on: forgejo/act#141
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Slatian <[email protected]>
Co-committed-by: Slatian <[email protected]>
Reviewed-on: forgejo/act#151
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#152
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Closes forgejo/runner#304

Reviewed-on: forgejo/act#156
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
https://github.com/nektos/act/pull/2311

The `dryrun` paramater's documentation is unhelpful (`dryrun mode`).

In the absense of proper documentation, [this definition from a comment on this topic](https://github.com/nektos/act/issues/268#issuecomment-1054834689) should be used.

Fixes: https://github.com/nektos/act/issues/268

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Co-authored-by: Jack Green <[email protected]>
Reviewed-on: forgejo/act#158
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: achyrva <[email protected]>
Co-committed-by: achyrva <[email protected]>
https://github.com/nektos/act/pull/2337

* meta: copy symlinks

* copy file (old style)

* copy files (new styles)

* avoid spelling error detection

* add error

* fix

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Co-authored-by: ChristopherHX <[email protected]>
Reviewed-on: forgejo/act#159
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: achyrva <[email protected]>
Co-committed-by: achyrva <[email protected]>
https://github.com/nektos/act/pull/2272

* Initial commit

* Put the tests back

* Remove unnecessary checks

* Remove unneeded check and fix test code

---------

Co-authored-by: Jason Song <[email protected]>

Co-authored-by: Andreas Taylor <[email protected]>
Reviewed-on: forgejo/act#157
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: achyrva <[email protected]>
Co-committed-by: achyrva <[email protected]>
https://github.com/nektos/act/pull/2372

+ fix: make node tool non volatile
Currently downgrading node via setup-node can break later actions

+ fix it and lookup on startup

+ fix problems

Co-authored-by: ChristopherHX <[email protected]>
Reviewed-on: forgejo/act#168
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Andrii Chyrva <[email protected]>
Co-committed-by: Andrii Chyrva <[email protected]>
This reverts commit 6e1377c2b0.

Refs forgejo/act#168/files (comment)
Blocking for

- actions/setup-forgejo#461
- forgejo/end-to-end#758

Tested locally with both of them.

```
$ ./end-to-end.sh actions_teardown
$ ( cd ../runner ; make --always-make forgejo-runner ; cp forgejo-runner /tmp/forgejo-end-to-end/forgejo-runner )
$ ./end-to-end.sh actions_setup 12.0
$ ./end-to-end.sh actions_verify_example conext
```

Reviewed-on: forgejo/act#171
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
This reverts commit f147e45da3.

!122 (commit f147e45da3)

is not the same as

https://github.com/nektos/act/pull/2236/files

Refs: forgejo/act#122

Reviewed-on: forgejo/act#173
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
- log job result as info not as debug
- add test

---

v6.4.0 regression introduced in 4880b091a2

It did not fail a test because the [original fix](forgejo/act#67/files)  has tests only for the case where a step is skipped, not when a job is skipped.

Closes forgejo/runner#660

Reviewed-on: forgejo/act#172
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
* feat: Validate GitHub Actions schema

**BREAKING** previously accepted workflows are now invalid

* update code

* fix tests

* Bump docker / fix lint

* fix test action due to moving the file

* remove unused function

* fix parsing additional functions

* fix allow int

* update docker dep, due to linter

(cherry picked from commit 64219df0f2155d75ffc4423dc93c1e80bb4740bc)

Conflicts:
	go.mod
	go.sum
	pkg/model/workflow.go

	trivial context conflict & go.mod upgrades
* fix: schema validation for job if functions

* Add Tests

* Update pkg/schema/schema.go

Co-authored-by: Josh Soref <[email protected]>

* Update pkg/schema/schema.go

---------

Co-authored-by: Josh Soref <[email protected]>
(cherry picked from commit f043eb7079a16dfcf54d1f44fe66795ff76e973a)
* fix: use non strict schema to allow some undefined behavior

* GitHub Actions doesn't use the newer strict schema in the service
* Tolerate more hallucinations

* Update workflow.go

* Update workflow.go

* Update pkg/model/workflow.go

Co-authored-by: Josh Soref <[email protected]>

---------

Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit b52da6190c971733cdf3ffcef97cdbdce4ba42e5)
This test was introduced by 61b7859f12
to verify a safeguard prevents a crash. With schema validation it is
caught at an earlier stage.
The error messages however difficult to parse will have to stand
on their own.
- has_with had undetected structure error now failing the schema
- empty_step and has_secrets are invalid and caught by the schema
  there no longer is a need for them
Otherwise act would reject such workflows right away

(cherry picked from commit efc95959aca96034426dcb93275eede5a3f47b83)

Conflicts:
	pkg/schema/workflow_schema.json
	trivial context conflict
It is a breaking change because it changes how the shell is
determined.

Before, if `jobs.<job_id>.container.image` is set and the shell is not
specified, it defaults to `sh` instead of `bash`.

After, regardless of `jobs.<job_id>.container.image`, if the shell is
not specified, it defaults to `bash` if available, otherwise it
defaults to `sh`.

Rework the shell integration tests:

- Remove container specific tests because the special behavior related
  to shell being set differently when a container image is present is
  removed
- Modify the defaults test case to verify the fallback logic
- Use container images from code.forgejo.org to escape rate limiting
  in the CI
- Add the missing node test
- Use
      container:
        image: code.forgejo.org/oci/node:22-bookworm
  instead of
      container: code.forgejo.org/oci/node:22-bookworm
  because it silently failed to run (with no exit code)
- Prefer `-z "${BASH}"` because `-z ${BASH+x}` reads obscure

Closes forgejo/runner#150
Reviewed-on: forgejo/act#170
Reviewed-by: Michael Kriese <[email protected]>
Reviewed-on: forgejo/act#177
Reviewed-by: Michael Kriese <[email protected]>
- rc.getToolCache(ctx) is used to figure out RUNNER_TOOL_CACHE and  returns RUNNER_TOOL_CACHE if it is found in the runner config, e.g.
  ```yaml
  container:
    env:
	  RUNNER_TOOL_CACHE: /srv/toolcache
  ```
- store the value in the new `toolCache` data member for containers,  in the same way it is done for host
- GetRunnerContext for containers return `toolCache` instead of a  hard coded string
- add integration test

Closes forgejo/runner#184

Reviewed-on: forgejo/act#178
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
- do not override username and password when looping over services
- split prepareJobContainer out of startJobContainer
- split getNetworkName out as it is used by both
- add unit tests for prepareJobContainer
- make containre.NewContainer mockable
- add MockVariable helper

Closes forgejo/runner#575

---

Note to reviewers: do not show whitespace change, the refactor will show in  a minimal way. When the fix is reverted the tests fail as follows:

```
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -81,4 +81,4 @@
        	            	   Image: (string) (len=10) "some:image",
        	            	-  Username: (string) (len=17) "containerusername",
        	            	-  Password: (string) (len=17) "containerpassword",
        	            	+  Username: (string) (len=16) "service2username",
        	            	+  Password: (string) (len=16) "service2password",
        	            	   Entrypoint: ([]string) (len=3) {
        	Test:       	TestStartJobContainer/Overlapping
```

Reviewed-on: forgejo/act#181
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
it is not used in the context of forgejo and is mistaken sometimes for being supported.

Reviewed-on: forgejo/act#182
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
This PR contains the following updates:

| Package | Change | Age | Confidence |
|---|---|---|---|
| [github.com/golangci/golangci-lint/cmd/golangci-lint](https://github.com/golangci/golangci-lint) | `v1.62.2` -> `v2.2.2` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint%2fcmd%2fgolangci-lint/v2.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint%2fcmd%2fgolangci-lint/v1.62.2/v2.2.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (github.com/golangci/golangci-lint/cmd/golangci-lint)</summary>

### [`v2.2.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v222)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.2.1...v2.2.2)

1. Linters bug fixes
   - `noinlineerr`: from 1.0.3 to 1.0.4
2. Documentation
   - Improve debug keys documentation
3. Misc.
   - fix: panic close of closed channel
   - godot: add noinline value into the JSONSchema

### [`v2.2.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v221)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.2.0...v2.2.1)

1. Linters bug fixes

- `varnamelen`: fix configuration

### [`v2.2.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v220)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.6...v2.2.0)

1. New linters
   - Add `arangolint` linter https://github.com/Crocmagnon/arangolint
   - Add `embeddedstructfieldcheck` linter https://github.com/manuelarte/embeddedstructfieldcheck
   - Add `noinlineerr` linter https://github.com/AlwxSin/noinlineerr
   - Add `swaggo` formatter https://github.com/golangci/swaggoswag
2. Linters new features or changes
   - `errcheck`: add `verbose` option
   - `funcorder`: from 0.2.1 to 0.5.0 (new option `alphabetical`)
   - `gomoddirectives`: from 0.6.1 to 0.7.0 (new option `ignore-forbidden`)
   - `iface`: from 1.3.1 to 1.4.0 (new option `unexported`)
   - `noctx`: from 0.1.0 to 0.3.3 (new report messages, and new rules related to `database/sql`)
   - `noctx`: from 0.3.3 to 0.3.4 (new SQL functions detection)
   - `revive`: from 1.9.0 to 1.10.0 (new rules: `time-date`, `unnecessary-format`, `use-fmt-print`)
   - `usestdlibvars`: from 1.28.0 to 1.29.0 (new option `time-date-month`)
   - `wsl`: deprecation
   - `wsl_v5`: from 4.7.0 to 5.0.0 (major version with new configuration)
3. Linters bug fixes
   - `dupword`: from 0.1.3 to 0.1.6
   - `exptostd`: from 0.4.3 to 0.4.4
   - `forbidigo`: from 1.6.0 to 2.1.0
   - `gci`: consistently format the code
   - `go-spancheck`: from 0.6.4 to 0.6.5
   - `goconst`: from 1.8.1 to 1.8.2
   - `gosec`: from 2.22.3 to 2.22.4
   - `gosec`: from 2.22.4 to 2.22.5
   - `makezero`: from 1.2.0 to 2.0.1
   - `misspell`: from 0.6.0 to 0.7.0
   - `usetesting`: from 0.4.3 to 0.5.0
4. Misc.
   - exclusions:  fix `path-expect`
   - formatters: write the input to `stdout` when using `stdin` and there are no changes
   - migration: improve the error message when trying to migrate a migrated config
   - `typecheck`: deduplicate errors
   - `typecheck`: stops the analysis after the first error
   - Deprecate `print-resources-usage` flag
   - Unique version per custom build
5. Documentation
   - Improves typecheck FAQ
   - Adds plugin systems recommendations
   - Add description for `linters.default` sets

### [`v2.1.6`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v216)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.5...v2.1.6)

1. Linters bug fixes
   - `godot`: from 1.5.0 to 1.5.1
   - `musttag`: from 0.13.0 to 0.13.1
2. Documentation
   - Add note about golangci-lint v2 integration in VS Code

### [`v2.1.5`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v215)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.4...v2.1.5)

Due to an error related to Snapcraft, some artifacts of the v2.1.4 release have not been published.

This release contains the same things as v2.1.3.

### [`v2.1.4`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v214)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.3...v2.1.4)

Due to an error related to Snapcraft, some artifacts of the v2.1.3 release have not been published.

This release contains the same things as v2.1.3.

### [`v2.1.3`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v213)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.2...v2.1.3)

1. Linters bug fixes
   - `fatcontext`: from 0.7.2 to 0.8.0
2. Misc.
   - migration: fix `nakedret.max-func-lines: 0`
   - migration: fix order of `staticcheck` settings
   - fix: add `go.mod` hash to the cache salt
   - fix: use diagnostic position for related information position

### [`v2.1.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v212)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.1...v2.1.2)

1. Linters bug fixes
   - `exptostd`: from 0.4.2 to 0.4.3
   - `gofumpt`: from 0.7.0 to 0.8.0
   - `protogetter`: from 0.3.13 to 0.3.15
   - `usetesting`: from 0.4.2 to 0.4.3

### [`v2.1.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v211)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.1.0...v2.1.1)

The release process of v2.1.0 failed due to a regression inside goreleaser.

The binaries of v2.1.0 have been published, but not the other artifacts (AUR, Docker, etc.).

### [`v2.1.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v210)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.0.2...v2.1.0)

1. Enhancements
   - Add an option to display absolute paths (`--path-mode=abs`)
   - Add configuration path placeholder (`${config-path}`)
   - Add `warn-unused` option for `fmt` command
   - Colored diff for `fmt` command (`golangci-lint fmt --diff-colored`)
2. New linters
   - Add `funcorder` linter https://github.com/manuelarte/funcorder
3. Linters new features or changes
   - `go-errorlint`: from 1.7.1 to 1.8.0 (automatic error comparison and type assertion fixes)
   - ⚠️ `goconst`: `ignore-strings` is deprecated and replaced by `ignore-string-values`
   - `goconst`: from 1.7.1 to 1.8.1 (new options: `find-duplicates`, `eval-const-expressions`)
   - `govet`: add `httpmux` analyzer
   - `nilnesserr`: from 0.1.2 to 0.2.0 (detect more cases)
   - `paralleltest`: from 1.0.10 to 1.0.14 (checks only `_test.go` files)
   - `revive`: from 1.7.0 to 1.9.0 (support kebab case for setting names)
   - `sloglint`: from 0.9.0 to 0.11.0 (autofix, new option `msg-style`, suggest `slog.DiscardHandler`)
   - `wrapcheck`: from 2.10.0 to 2.11.0 (new option `report-internal-errors`)
   - `wsl`: from 4.6.0 to 4.7.0 (cgo files are always excluded)
4. Linters bug fixes
   - `fatcontext`: from 0.7.1 to 0.7.2
   - `gocritic`: fix `importshadow` checker
   - `gosec`: from 2.22.2 to 2.22.3
   - `ireturn`: from 0.3.1 to 0.4.0
   - `loggercheck`: from 0.10.1 to 0.11.0
   - `nakedret`: from 2.0.5 to 2.0.6
   - `nonamedreturns`: from 1.0.5 to 1.0.6
   - `protogetter`: from 0.3.12 to 0.3.13
   - `testifylint`: from 1.6.0 to 1.6.1
   - `unconvert`: update to HEAD
5. Misc.
   - Fixes memory leaks when using go1.(N) with golangci-lint built with go1.(N-X)
   - Adds `golangci-lint-fmt` pre-commit hook
6. Documentation
   - Improvements
   - Updates section about vscode integration

### [`v2.0.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v202)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.0.1...v2.0.2)

1. Misc.
   - Fixes flags parsing for formatters
   - Fixes the filepath used by the exclusion `source` option
2. Documentation
   - Adds a section about flags migration
   - Cleaning pages with v1 options

### [`v2.0.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v201)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.0.0...v2.0.1)

1. Linters/formatters bug fixes
   - `golines`: fix settings during linter load
2. Misc.
   - Validates the `version` field before the configuration
   - `forbidigo`: fix migration

### [`v2.0.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v200)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.8...v2.0.0)

1. Enhancements
   - 🌟 New `golangci-lint fmt` command with dedicated [formatter configuration](https://golangci-lint.run/welcome/quick-start/#formatting)
   - ♻️ New `golangci-lint migrate` command to help migration from v1 to v2 (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#command-migrate))
   - ⚠️ New default values (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
   - ⚠️ No exclusions by default (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#issuesexclude-use-default))
   - ⚠️ New default sort order (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#outputsort-order))
   - 🌟 New option `run.relative-path-mode` (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#runrelative-path-mode))
   - 🌟 New linters configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#linters))
   - 🌟 New output format configuration (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#output))
   - 🌟 New `--fast-only` flag (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersfast))
   - 🌟 New option `linters.exclusions.warn-unused` to log a warning if an exclusion rule is unused.
2. New linters/formatters
   - Add `golines` formatter https://github.com/segmentio/golines
3. Linters new features
   - ⚠️ Merge `staticcheck`, `stylecheck`, `gosimple` into one linter (`staticcheck`) (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#lintersenablestylecheckgosimplestaticcheck))
   - `go-critic`: from 0.12.0 to 0.13.0
   - `gomodguard`: from 1.3.5 to 1.4.1 (block explicit indirect dependencies)
   - `nilnil`: from 1.0.1 to 1.1.0 (new option: `only-two`)
   - `perfsprint`: from 0.8.2 to 0.9.1 (checker name in the diagnostic message)
   - `staticcheck`: new `quickfix` set of rules
   - `testifylint`: from 1.5.2 to 1.6.0 (new options: `equal-values`, `suite-method-signature`, `require-string-msg`)
   - `wsl`: from 4.5.0 to 4.6.0 (new option: `allow-cuddle-used-in-block`)
4. Linters bug fixes
   - `bidichk`: from 0.3.2 to 0.3.3
   - `errchkjson`: from 0.4.0 to 0.4.1
   - `errname`: from 1.0.0 to 1.1.0
   - `funlen`: fix `ignore-comments` option
   - `gci`: from 0.13.5 to 0.13.6
   - `gosmopolitan`: from 1.2.2 to 1.3.0
   - `inamedparam`: from 0.1.3 to 0.2.0
   - `intrange`: from 0.3.0 to 0.3.1
   - `protogetter`: from 0.3.9 to 0.3.12
   - `unparam`: from [`8a5130c`](8a5130ca72) to [`0df0534`](0df0534333)
5. Misc.
   - 🧹 Configuration options renaming (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
   - 🧹 Remove options (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
   - 🧹 Remove flags (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
   - 🧹 Remove alternative names (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/#alternative-linter-names))
   - 🧹 Remove or replace deprecated elements (cf. [Migration guide](https://golangci-lint.run/product/migration-guide/))
   - Adds an option to display some commands as JSON:
     - `golangci-lint config path --json`
     - `golangci-lint help linters --json`
     - `golangci-lint help formatters --json`
     - `golangci-lint linters --json`
     - `golangci-lint formatters --json`
     - `golangci-lint version --json`
6. Documentation
   - [Migration guide](https://golangci-lint.run/product/migration-guide/)

### [`v1.64.8`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1648)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.7...v1.64.8)

- Detects use of configuration files from golangci-lint v2

### [`v1.64.7`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1647)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.6...v1.64.7)

1. Linters bug fixes
   - `depguard`: from 2.2.0 to 2.2.1
   - `dupl`: from [`3e9179a`](3e9179ac44) to [`f665c8d`](f665c8d69b)
   - `gosec`: from 2.22.1 to 2.22.2
   - `staticcheck`: from 0.6.0 to 0.6.1
2. Documentation
   - Add GitLab documentation

### [`v1.64.6`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1646)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.5...v1.64.6)

1. Linters bug fixes
   - `asciicheck`: from 0.4.0 to 0.4.1
   - `contextcheck`: from 1.1.5 to 1.1.6
   - `errcheck`: from 1.8.0 to 1.9.0
   - `exptostd`: from 0.4.1 to 0.4.2
   - `ginkgolinter`: from 0.19.0 to 0.19.1
   - `go-exhaustruct`: from 3.3.0 to 3.3.1
   - `gocheckcompilerdirectives`: from 1.2.1 to 1.3.0
   - `godot`: from 1.4.20 to 1.5.0
   - `perfsprint`: from 0.8.1 to 0.8.2
   - `revive`: from 1.6.1 to 1.7.0
   - `tagalign`: from 1.4.1 to 1.4.2

### [`v1.64.5`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1645)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.4...v1.64.5)

1. Bug fixes
   - Add missing flag `new-from-merge-base-flag`
2. Linters bug fixes
   - `asciicheck`: from 0.3.0 to 0.4.0
   - `forcetypeassert`: from 0.1.0 to 0.2.0
   - `gosec`: from 2.22.0 to 2.22.1

### [`v1.64.4`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1644)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.3...v1.64.4)

1. Linters bug fixes
   - `gci`: fix standard packages list for go1.24

### [`v1.64.3`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1643)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.2...v1.64.3)

1. Linters bug fixes
   - `ginkgolinter`: from 0.18.4 to 0.19.0
   - `go-critic`: from 0.11.5 to 0.12.0
   - `revive`: from 1.6.0 to 1.6.1
   - `gci`: fix standard packages list for go1.24
2. Misc.
   - Build Docker images with go1.24

### [`v1.64.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1642)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.1...v1.64.2)

This is the last minor release of golangci-lint v1.
The next release will be golangci-lint [v2](https://github.com/golangci/golangci-lint/issues/5300).

1. Enhancements
   - 🎉 go1.24 support
   - New `issues.new-from-merge-base` option
   - New `run.relative-path-mode` option
2. Linters new features
   - `copyloopvar`: from 1.1.0 to 1.2.1 (support suggested fixes)
   - `exptostd`: from 0.3.1 to 0.4.1 (handles `golang.org/x/exp/constraints.Ordered`)
   - `fatcontext`: from 0.5.3 to 0.7.1 (new option: `check-struct-pointers`)
   - `perfsprint`: from 0.7.1 to 0.8.1 (new options: `integer-format`, `error-format`, `string-format`, `bool-format`, and `hex-format`)
   - `revive`: from 1.5.1 to 1.6.0 (new rules: `redundant-build-tag`, `use-errors-new`. New option `early-return.early-return`)
3. Linters bug fixes
   - `go-errorlint`: from 1.7.0 to 1.7.1
   - `gochecknoglobals`: from 0.2.1 to 0.2.2
   - `godox`: from [`006bad1`](006bad1f9d) to 1.1.0
   - `gosec`: from 2.21.4 to 2.22.0
   - `iface`: from 1.3.0 to 1.3.1
   - `nilnesserr`: from 0.1.1 to 0.1.2
   - `protogetter`: from 0.3.8 to 0.3.9
   - `sloglint`: from 0.7.2 to 0.9.0
   - `spancheck`: fix default `StartSpanMatchersSlice` values
   - `staticcheck`: from 0.5.1 to 0.6.0
4. Deprecations
   - ⚠️ `tenv` is deprecated and replaced by `usetesting.os-setenv: true`.
   - ⚠️ `exportloopref` deprecation step 2
5. Misc.
   - Sanitize severities by output format
   - Avoid panic with plugin without description
6. Documentation
   - Clarify `depguard` configuration

### [`v1.64.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1641)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.0...v1.64.1)

Cancelled due to CI failure.

### [`v1.64.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1640)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.4...v1.64.0)

Cancelled due to CI failure.

### [`v1.63.4`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1634)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.3...v1.63.4)

1. Linters bug fixes
   - `dupl`, `gomodguard`, `revive`: keep only Go-files.

### [`v1.63.3`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1633)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.2...v1.63.3)

1. Linters bug fixes
   - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with several trailing EOL
   - `goheader`: skip issues with invalid positions

### [`v1.63.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1632)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.1...v1.63.2)

1. Linters bug fixes
   - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with missing trailing EOL

### [`v1.63.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1631)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.0...v1.63.1)

1. Linters bug fixes
   - `cgi`: invalid reports with cgo
   - `gofumpt`: panic with autofix and cgo

### [`v1.63.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1630)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.62.2...v1.63.0)

1. Enhancements
   - Add support for SuggestedFixes 🎉 (35 linters can "autofix" reports).
   - Formatters (`gofmt`, `goimports`, `gofumpt`, `gci`) are applied after the suggested fixes.
2. New linters
   - Add `exptostd` linter https://github.com/ldez/exptostd
   - Add `nilnesserr` linter https://github.com/alingse/nilnesserr
   - Add `usetesting` linter https://github.com/ldez/usetesting
3. Linters new features
   - `gci`: new options: `no-inline-comments`, `no-prefix-comments`
   - `gomoddirectives`: from 0.2.4 to 0.6.0 (new options: `go-version-pattern`, `toolchain-pattern`,`toolchain-forbidden`, `tool-forbidden`, `go-debug-forbidden`)
   - `govet`: new `stdversion`, `waitgroup` analyzers
   - `importas`: allow multiple empty aliases
   - `loggercheck`: new `slog` option
   - `recvcheck`: from 0.1.2 to 0.2.0 (new options: `disable-builtin`, `exclusions`)
   - `tagliatelle`: from 0.5.0 to 0.7.1 (new options: `ignored-fields`, `extended-rules`,`overrides`, `pkg`, `ignore`)
   - `usestdlibvars`: from 1.27.0 to 1.28.0 (autofix)
   - `wrapcheck`: from 2.9.0 to 2.10.0 (new option: `extra-ignore-sigs`)
4. Linters bug fixes
   - `asciicheck`: from 0.2.0 to 0.3.0
   - `bodyclose`: from [`5742072`](5742072509) to [`ed6a65f`](ed6a65f985)
   - `funlen`: from 0.1.0 to 0.2.0
   - `ginkgolinter`: from 0.18.3 to 0.18.4
   - `gochecksumtype`: from 0.2.0 to 0.3.1
   - `gocognit`: from 1.1.3 to 1.2.0
   - `godot`: from 1.4.18 to 1.4.20
   - `goheader`: report position improvement
   - `gosec`: handling of global nosec option when it is false
   - `iface`: from 1.2.1 to 1.3.0
   - `importas`: from 0.1.0 to 0.2.0
   - `intrange`: from 0.2.1 to 0.3.0
   - `makezero`: from 1.1.1 to 1.2.0
   - `mirror`: from 1.2.0 to 1.3.0
   - `nilnil`: from 1.0.0 to 1.0.1
   - `nosprintfhostport`: from 0.1.1 to 0.2.0
   - `reassign`: from 0.2.0 to 0.3.0
   - `spancheck`: from 0.6.2 to 0.6.4
   - `tagalign`: from 1.3.4 to 1.4.1
   - `wastedassign`: from 2.0.7 to 2.1.0
   - `whitespace`: from 0.1.1 to 0.2.0
   - `wsl`: from 4.4.1 to 4.5.0
5. Deprecations
   - ⚠️ `output.uniq-by-line` is deprecated and replaced by `issues.uniq-by-line`.
6. Misc.
   - Improvements of the help command (color and JSON support).
   - Removes `decoder`, `sloglint`, `tagalign` from `format` preset.
   - Enables paths with junction inside Windows.
   - The timeout is disabled if `run.timeout` <= 0.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4zMi4xIiwidXBkYXRlZEluVmVyIjoiNDEuMzIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#185
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
This is a followup of forgejo/act#170 so that it is possible to read a workflow without validation. It is not uncommon for Forgejo to read a workflow just to extract a few information from it, knowing it has been validated before. It would be a performance regression if schema validation happened in these cases.

This is a port of https://github.com/nektos/act/pull/2717/files

It is a breaking change in the context of Forgejo and Forgejo runner because it will need to add the new `validate` argument when reading workflows.

Co-authored-by: ChristopherHX <[email protected]>
Reviewed-on: forgejo/act#180
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Port of https://gitea.com/gitea/act/pulls/117

Refs forgejo/act#100

Co-authored-by: Jason Song <[email protected]>
Reviewed-on: forgejo/act#186
Reviewed-by: Michael Kriese <[email protected]>
In the current implementation, the network will only be created and be scheduled to be deleted when there is a service:

```go
func (rc *RunContext) networkName() (string, bool) {
	if len(rc.Run.Job().Services) > 0 || rc.Config.ContainerNetworkMode == "" {
		return fmt.Sprintf("%s-%s-network", rc.jobContainerName(), rc.Run.JobID), true
	}
	return string(rc.Config.ContainerNetworkMode), false
}
```

Therefore it does not currently make a difference. However, in case the network creation logic changes and a network is created even if a service is not present, it would be incorrect not to delete it.

Reviewed-on: forgejo/act#189
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
- s/[^A-Z0-9-]/_/g
- add a log line in case the name is sanitized

Closes forgejo/runner#226

---

It is breaking because it will fail jobs that rely on service names that contain characters that are sanitized

Reviewed-on: forgejo/act#190
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
This created confusion when the interpretation of the absence of `runs-on` changed unexpectedly. Making it mandatory fixes this ambiguity.

Reviewed-on: forgejo/act#192
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
For instance, the volume name derived from the workflow name may exceed the file system limit when the container name it is derived from is too long.

Fixes forgejo/runner#152

Reviewed-on: forgejo/act#191
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
An invalid workflow_{dispatch,call} key with a type that is not a map may attempt to use a nil map. It happens randomly as the order of the key maps is not guaranteed. Without this fix, the tests will fail 100% of the time with:

`go test -count=500 -run=TestParseRawOn/on:___workflow_ -v ./pkg/jobparser/`

Regression from forgejo/act#45

Reviewed-on: forgejo/act#193
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Fix places where deprecated functions/types were used.

Reviewed-on: forgejo/act#196
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Gusted <[email protected]>
Co-committed-by: Gusted <[email protected]>
- prefer the lowercase version of the DNS name which is more common they are case insensitive anyway
- fix the inverted information when sanitation happens

Reviewed-on: forgejo/act#197
Reviewed-by: msrd0 <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
If not the schema validation will fail because it will be try to validate as if not calling a reusable workflow.

```
=== RUN   TestWorkflowCallRunsOn
    schema_test.go:119:
        	Error Trace:	/home/earl-warren/software/act/pkg/schema/schema_test.go:119
        	Error:      	Received unexpected error:
        	            	Line: 10 Column 5: Failed to match job-factory: Line: 12 Column 5: Unknown Property uses
        	            	Line: 13 Column 5: Unknown Property with
        	            	Line: 15 Column 5: Unknown Property secrets
        	            	Line: 10 Column 5: Failed to match workflow-job: Line: 11 Column 5: Unknown Property runs-on
        	Test:       	TestWorkflowCallRunsOn
```

Reviewed-on: forgejo/act#194
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#201
Reviewed-by: msrd0 <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
- the model defines them as strings and can parse them either as string or their effective type (boolean, number)
- add workflow validation when reading all testdata
- add fail-fast, max-parallel, timeout-minutes, cancel-timeout-minutes to test workflows in the jobparser tests

Reviewed-on: forgejo/act#203
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#204
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
https://code.forgejo.org/forgejo/act/actions/runs/1157/jobs/0#jobstep-10-251
Reviewed-on: forgejo/act#198
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Refs #740

Reviewed-on: forgejo/act#199
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Only changes test files.

---

- remove tests specific to running on a host with no container
  they are the same as with the containers (TestRunEventHostEnvironment)
- prefix the name of the tests with a distinctive name to
  more easily run them together
- use code.forgejo.org/oci images whereever possible
- remove some tests that are either
  - difficult to understand (ancient bugs)
  - not yet well understood (related to reusable workflows)
  - depend on github (generation of workflows to be run on the fly
    e.g. updateTestIfWorkflow)
- fix the TestSanitizeNetworkAlias tests that were not run
  and make them easier to debug
- disable tests of options that are forbidden in Forgejo Actions
  (testdata/container-hostname/push.yml)

Reviewed-on: forgejo/act#202
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Reviewed-on: forgejo/act#205
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
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: forgejo/act#206
Reviewed-by: Michael Kriese <[email protected]>
Co-authored-by: Earl Warren <[email protected]>
Co-committed-by: Earl Warren <[email protected]>
Contributor

cascading-pr updated at actions/setup-forgejo#533

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/533
earl-warren force-pushed wip-act from f9f49d107a
Some checks failed
checks / build and test (pull_request) Failing after 44s
checks / runner exec tests (pull_request) Has been skipped
/ cascade (pull_request_target) Has been cancelled
to 1de9938fd4
Some checks failed
/ cascade (pull_request_target) Has been cancelled
checks / build and test (pull_request) Failing after 1m20s
checks / runner exec tests (pull_request) Has been skipped
2025-07-28 16:14:06 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#533

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/533
earl-warren changed title from feat: merge forgejo/act/pkg in the act directory to feat: merge forgejo/act/pkg in the act directory [skip cascade] 2025-07-28 16:14:42 +00:00
earl-warren changed title from feat: merge forgejo/act/pkg in the act directory [skip cascade] to feat: merge forgejo/act/pkg in the act directory 2025-07-28 16:21:08 +00:00
earl-warren force-pushed wip-act from e6d4e18a9f
All checks were successful
/ cascade (pull_request_target) Has been skipped
checks / build and test (pull_request) Successful in 41s
checks / runner exec tests (pull_request) Successful in 24s
to 78dfe797f0
All checks were successful
checks / build and test (pull_request) Successful in 37s
checks / runner exec tests (pull_request) Successful in 24s
/ cascade (pull_request_target) Successful in 12s
2025-07-28 16:29:52 +00:00
Compare
Contributor

cascading-pr updated at actions/setup-forgejo#533

cascading-pr updated at https://code.forgejo.org/actions/setup-forgejo/pulls/533
Gusted approved these changes 2025-07-28 16:50:13 +00:00
Gusted left a comment
Owner

LGTM, authorship is retained in the commits.

LGTM, authorship is retained in the commits.
earl-warren deleted branch wip-act 2025-07-28 17:10:27 +00:00
earl-warren referenced this pull request from a commit 2025-07-28 17:10:28 +00:00
viceice approved these changes 2025-07-28 17:27:26 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/runner!753
No description provided.