Commit graph

760 commits

Author SHA1 Message Date
Ryan
31d3603173
deps: remove shlex (#1086) 2022-03-29 15:55:40 +00:00
Ryan
de81979800
fix: set default version string (#1070)
for when people don't specify version via -ldflags

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-29 09:37:38 +00:00
dependabot[bot]
4f0bfd2ad1
build(deps): bump actions/cache from 2 to 3 (#1082)
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-28 20:05:07 +00:00
dependabot[bot]
c8a40bf8f4
build(deps): bump github.com/docker/docker (#1080)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.13+incompatible to 20.10.14+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.13...v20.10.14)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-28 19:58:14 +00:00
dependabot[bot]
efd34f1e10
build(deps): bump github.com/AlecAivazis/survey/v2 from 2.3.2 to 2.3.4 (#1079)
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.3.2 to 2.3.4.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.3.2...v2.3.4)

---
updated-dependencies:
- dependency-name: github.com/AlecAivazis/survey/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-28 19:50:40 +00:00
dependabot[bot]
34706f49fe
build(deps): bump github.com/docker/cli (#1081)
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 20.10.13+incompatible to 20.10.14+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v20.10.13...v20.10.14)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
2022-03-28 19:42:10 +00:00
Casey Lee
7fbaf1371f
automatically merge PRs from dependabot (#1084) 2022-03-28 12:29:47 -07:00
Ryan
c4db165d2d
deps: bump go-git (#1057) 2022-03-25 16:16:31 +00:00
Markus Wolf
2bb3e74616
feat: split job steps into its own files/structs (#1004)
* 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 <marcus.noll@new-work.se>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
Co-authored-by: Jonas Holland <jonas.holland@new-work.se>

* 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 <marcus.noll@new-work.se>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
Co-authored-by: Jonas Holland <jonas.holland@new-work.se>

* 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 <bjoern.brauer@new-work.se>
Co-authored-by: Marcus Noll <marcus.noll@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
Co-authored-by: Jonas Holland <jonas.holland@new-work.se>
Co-authored-by: Casey Lee <cplee@nektos.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2022-03-22 14:13:00 -07:00
Ryan
5d7027dc3f
feat: add bug-report flag (#1056)
* 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>
2022-03-22 19:26:10 +00:00
ChristopherHX
a970145c95
Fix: panic: reflect: slice index out of range (#1066)
* 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>
2022-03-22 14:05:36 -04:00
ChristopherHX
380bd581b1
Fix: call of reflect.Value.Interface on zero Value (#1067)
panic: reflect: call of reflect.Value.Interface on zero Value

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-22 09:03:36 +00:00
ChristopherHX
5083284deb
Fix: tojson(null) == 'null' (#1068)
* Fix: tojson(null) == 'null'

* Update test

* Update functions_test.go
2022-03-22 08:55:13 +00:00
dependabot[bot]
87175ecb68
build(deps): bump github.com/docker/docker (#1062)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.12...v20.10.13)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-21 19:33:41 +00:00
dependabot[bot]
7d946c43e2
build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#1061)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-21 19:24:22 +00:00
Robert Kowalski
f09cdb8443
feat: add flag to always run the checkout action (#1049)
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.
2022-03-21 11:23:06 +00:00
ChristopherHX
4d7107161e
Revert: Don't stop JobContainer on failure (#1041) 2022-03-14 19:46:32 +00:00
Robert Kowalski
1e92d87b75
fix: remove unused TestContext (#1013)
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 <cplee@nektos.com>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-14 17:47:16 +00:00
Markus Wolf
6b059572ff
feat: add step name to logger field (#1027)
* 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 <cplee@nektos.com>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
2022-03-14 10:38:30 -07:00
Björn Brauer
aab2af0919
fix: coerce booleans to numbers for comparison in exprparser (#1030)
Co-Authored-By: Markus Wolf <markus.wolf@new-work.se>

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: Casey Lee <cplee@nektos.com>
2022-03-14 16:38:42 +00:00
Markus Wolf
14c98015c5
feat: add json logger output (#1026)
* 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 <cplee@nektos.com>
2022-03-14 15:33:11 +00:00
dependabot[bot]
7d403b8307
build(deps): bump golangci/golangci-lint-action from 2 to 3.1.0 (#1019)
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:21:54 -07:00
Ryan
932ad0ef6a
ci(stalebot): ignore feature requests (#1017) 2022-03-14 08:21:06 -07:00
dependabot[bot]
0579f7c235
build(deps): bump actions/checkout from 2 to 3 (#1028)
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] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:14:32 -07:00
dependabot[bot]
fa71f0b1e0
build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#1040)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:14:20 -07:00
dependabot[bot]
933413e2c0
build(deps): bump github.com/docker/cli (#1038)
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 20.10.12+incompatible to 20.10.13+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v20.10.12...v20.10.13)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:14:05 -07:00
dependabot[bot]
ee92e07daa
build(deps): bump github.com/rhysd/actionlint from 1.6.9 to 1.6.10 (#1039)
Bumps [github.com/rhysd/actionlint](https://github.com/rhysd/actionlint) from 1.6.9 to 1.6.10.
- [Release notes](https://github.com/rhysd/actionlint/releases)
- [Changelog](https://github.com/rhysd/actionlint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rhysd/actionlint/compare/v1.6.9...v1.6.10)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:12:24 -07:00
dependabot[bot]
5c0023c346
build(deps): bump github.com/docker/distribution (#1037)
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.8.0+incompatible to 2.8.1+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.8.0...v2.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 08:11:39 -07:00
dependabot[bot]
56486f14b4
build(deps): bump github.com/moby/buildkit from 0.9.3 to 0.10.0 (#1036)
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/moby/buildkit/releases)
- [Commits](https://github.com/moby/buildkit/compare/v0.9.3...v0.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 15:10:50 +00:00
Ryan
3db3c73723
fix: trim whitespace from actrc (#1024)
fixes #985

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-02 21:41:57 +00:00
Robert Kowalski
c22d833830
fix: hide masked values in log files (#1011)
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 <bjoern.brauer@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
2022-03-02 08:29:34 +00:00
dependabot[bot]
e9e6ddadf5
build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#955)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-28 14:51:36 +00:00
Elijah Lynn
55da213bc0
Update link to 'filesystems' GitHub docs (#1016)
Link is redirected to https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-28 14:43:04 +00:00
dependabot[bot]
9a54c99ac7
build(deps): bump github.com/rhysd/actionlint from 1.6.8 to 1.6.9 (#1018)
Bumps [github.com/rhysd/actionlint](https://github.com/rhysd/actionlint) from 1.6.8 to 1.6.9.
- [Release notes](https://github.com/rhysd/actionlint/releases)
- [Changelog](https://github.com/rhysd/actionlint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rhysd/actionlint/compare/v1.6.8...v1.6.9)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 14:35:14 +00:00
Markus Wolf
18792f9620
feat: run jobs in parallel (#1003)
* 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>
2022-02-25 18:47:16 +00:00
Björn Brauer
c24cfc72f4
Expression evaluator fixes (#1009)
* 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>
2022-02-25 18:39:50 +00:00
dependabot[bot]
7d433968e5
build(deps): bump github.com/go-ini/ini from 1.64.0 to 1.66.4 (#997)
Bumps [github.com/go-ini/ini](https://github.com/go-ini/ini) from 1.64.0 to 1.66.4.
- [Release notes](https://github.com/go-ini/ini/releases)
- [Commits](https://github.com/go-ini/ini/compare/v1.64.0...v1.66.4)

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

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-25 16:55:09 +00:00
Ryan
ad06f5dfb8
fix: print line after password prompt (#1014)
fixes https://github.com/nektos/act/issues/979
2022-02-25 16:47:49 +00:00
Björn Brauer
ff13844b86
refactor: default empty if: statement to if: success() in evaluator & remove FixIfStatement() (#990)
* 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>
2022-02-15 20:03:00 +00:00
ChristopherHX
d1e0216039
fix: deep evaluate matrix strategy (#964)
* 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 <cplee@nektos.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-15 16:35:02 +00:00
dependabot[bot]
0fae96792c
build(deps): bump github.com/docker/distribution (#994)
Bumps [github.com/docker/distribution](https://github.com/docker/distribution) from 2.7.1+incompatible to 2.8.0+incompatible.
- [Release notes](https://github.com/docker/distribution/releases)
- [Commits](https://github.com/docker/distribution/compare/v2.7.1...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/docker/distribution
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 14:55:38 +00:00
rubemlrm
331afe170a
Added instructions to install on fedora using copr package (#993)
* Added instructions to install on fedora

* Removed missing badge for copr link
2022-02-11 20:17:38 +00:00
Björn Brauer
9abc87b416
fix: always execute closeContainer() executor (#988)
* 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.
2022-02-10 16:54:58 +00:00
Björn Brauer
e4f0080a1e
refactor: extract setupAction into ActionReader (#986)
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 <markus.wolf@new-work.se>

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
2022-02-08 20:17:59 +00:00
Philipp Hinrichsen
e23223ad02
refactor: extract RunContext Executor in JobExecutor (#984)
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 <bjoern.brauer@new-work.se>
Co-authored-by: Marcus Noll <marcus.noll@new-work.se>
Co-authored-by: Jonas Holland <jonas.holland@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
Co-authored-by: Marcus Noll <marcus.noll@new-work.se>
Co-authored-by: Jonas Holland <jonas.holland@new-work.se>
Co-authored-by: Robert Kowalski <robert.kowalski@new-work.se>
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
2022-02-08 17:22:41 +00:00
Gissur Þórhallsson
b1f5963c86
docs: Expand the GITHUB_TOKEN section (#968)
* docs: Expand the GITHUB_TOKEN section

* docs: Add a note on leaking GITHUB_TOKEN through shell history

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-31 21:19:22 +00:00
Ryan
4f8da0a51c
ci(Mergify): configuration update (#972)
Signed-off-by: Ryan <me@hackerc.at>
2022-01-27 11:38:17 -08:00
Josh Soref
c802064975
fix: docker cp of dangling symlink (#943) (#948)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-27 16:53:26 +00:00
ChristopherHX
7dbf3fcb96
Fix: regression run after failure (#971)
* Fix: Regressions of run step after failure

* Add test, to enshure no panic

* Print error of failed step
2022-01-27 16:20:44 +00:00
Ryan
557dc755b8
ci(Mergify): configuration update (#966)
* ci(Mergify): configuration update

Signed-off-by: Ryan <me@hackerc.at>

* fix: check for maintainers only
2022-01-26 09:12:42 -08:00