* 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
Use the -s (silent) flag so curl does not pass metainformation like
downloadspeed etc to bash.
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
* 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
* added input flags
* added input as part of the action event and added test cases
* updated readme
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
* 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
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 <mail@markus-wolf.de>
Co-authored-by: Markus Wolf <mail@markus-wolf.de>
* 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 <mail@markus-wolf.de>
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 74da5b085c (r1042413431)
Co-authored-by: mergify[bot] <37929162+mergify[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>
* 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>
* 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 #1497Fixes#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>
* 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>
* 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>
* refactor: share UpdateFromEnv logic
* Add test for GITHUB_OUTPUT
Co-authored-by: Ben Randall <veleek@gmail.com>
* Add GITHUB_STATE test
* Add test for the old broken parser
Co-authored-by: Ben Randall <veleek@gmail.com>
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>