Commit Graph

788 Commits

Author SHA1 Message Date
Casey Lee 78e1ceb0a8
feat: release extension 2023-01-20 10:13:18 -08:00
Casey Lee d690a5fee9
feat: release extension 2023-01-20 10:11:34 -08:00
Casey Lee 19e6929398
feat: release extension 2023-01-20 10:10:20 -08:00
ChristopherHX b00babd0d9
refactor: pull and rebuild docker by default (#1569)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-20 15:46:43 +00:00
Markus Wolf 82a8c1e80d
feat: add remote reusable workflows (#1525)
* 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>
2023-01-19 20:49:11 +00:00
Yoshiaki Yoshida 566b9d843e
Fixed auto-generated platform configuration with Micro size image (#1566)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-19 06:49:16 +00:00
Alexandre Lavigne 7ebcc1c816
Feature/allow worktrees (#1530)
* 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
2023-01-19 06:29:23 +00:00
github-actions[bot] 3e23b4fbb5 chore: bump VERSION to 0.2.40 2023-01-16 21:35:04 +00:00
Casey Lee 63ae215071
fix: update artifact server to address GHSL-2023-004 (#1565) 2023-01-16 21:01:54 +00:00
github-actions[bot] efb12b7f12 chore: bump VERSION to 0.2.39 2023-01-16 20:07:23 +00:00
Casey Lee b3c06dc19d
chore: fix promote script 2023-01-16 09:57:35 -08:00
Casey Lee 0d0780580c
chore: bump version 2023-01-16 09:54:43 -08:00
Casey Lee 872a69548c
chore: makefile update 2023-01-16 09:43:53 -08:00
Casey Lee 33cb8bca64
chore: bump version 2023-01-16 09:39:52 -08:00
dependabot[bot] d8ba8cbf17
build(deps): bump github.com/moby/buildkit from 0.10.6 to 0.11.0 (#1563)
* 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] <support@github.com>

* chore: use new patternmatcher.Matches

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 <caseypl@amazon.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-16 17:26:22 +00:00
Casey Lee 003947ea33
chore: push new version 2023-01-16 09:11:29 -08:00
Philippe Schenker 0988b47752
Readme: Fix shell installation (#1547)
Use the -s (silent) flag so curl does not pass metainformation like
downloadspeed etc to bash.

Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2023-01-16 14:30:11 +00:00
Robin Breathe d064863f9b
fix: allow override of artifact server bind address (#1560)
* 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
2023-01-16 14:12:20 +00:00
Casey Lee 93907931df
feat: add check for newer versions (#1562)
* 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.*
2023-01-15 10:30:41 +00:00
Shubh Bapna 767e6a8696
Input (#1524)
* 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>
2023-01-13 19:28:17 +00:00
ChristopherHX b2fb9e64ac
refactor: remove docker image list reference filter (#1501)
* 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
2023-01-13 17:52:54 +00:00
ChristopherHX 8b4f210872
fix: add-matcher fails github workflow (#1532)
* fix: add-matcher fails github workflow

* make linter happy
2023-01-13 17:01:40 +00:00
Björn Brauer 3f3b25ae84
feat: add support for building docker actions with private registries (#1557)
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>
2023-01-12 21:29:30 +00:00
dependabot[bot] 3ac756b37a
build(deps): bump github.com/containerd/containerd from 1.6.6 to 1.6.12 (#1554)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.6 to 1.6.12.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.6...v1.6.12)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

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

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>
2023-01-10 22:23:48 +00:00
ChristopherHX 7e8d070811
feat: Allow building without docker support (#1507)
* feat: Allow building without docker support

* fix macos build tag

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-10 22:08:57 +00:00
ChristopherHX a53a1c2000
fix: extra path lost in composite actions (#1531)
* 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>
2023-01-10 21:55:05 +00:00
Markus Wolf 3f4a6dc462
test: make sure workflow_call is not a github event calling our workflow (#1520)
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>
2023-01-10 21:43:12 +00:00
Markus Wolf b14398eff3
fix: preserve job result state in case of failure (#1519)
* 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>
2023-01-10 21:31:12 +00:00
dependabot[bot] f0c6fa11be
build(deps): bump megalinter/megalinter from 6.17.0 to 6.18.0 (#1550)
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 21:16:52 +00:00
dependabot[bot] cfc1b91aa1
build(deps): bump megalinter/megalinter from 6.16.0 to 6.17.0 (#1540)
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 02:43:57 +00:00
dependabot[bot] 0d388572a8
build(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 (#1539)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.16 to 0.0.17.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.16...v0.0.17)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 02:27:22 +00:00
dependabot[bot] 9c7085195c
build(deps): bump github.com/go-git/go-billy/v5 from 5.3.1 to 5.4.0 (#1541)
Bumps [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](https://github.com/go-git/go-billy/compare/v5.3.1...v5.4.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-02 02:13:45 +00:00
dependabot[bot] e3a722e7c6
build(deps): bump megalinter/megalinter from 6.15.0 to 6.16.0 (#1534)
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] <support@github.com>

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-12-26 02:28:46 +00:00
dependabot[bot] d3ce2b0a46
build(deps): bump actions/stale from 6 to 7 (#1535)
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-26 02:13:17 +00:00
ChristopherHX 4989f444f1
revert: deprecation of containerArchitecture (#1514)
* 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>
2022-12-19 21:24:05 +00:00
dependabot[bot] c044035d9e
build(deps): bump goreleaser/goreleaser-action from 3 to 4 (#1515)
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-19 15:46:21 +00:00
dependabot[bot] 767969502a
build(deps): bump github.com/docker/cli (#1516)
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 20.10.21+incompatible to 20.10.22+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v20.10.21...v20.10.22)

---
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>

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-12-19 15:33:25 +00:00
dependabot[bot] 469d024c1f
build(deps): bump github.com/docker/docker (#1517)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.21+incompatible to 20.10.22+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v20.10.21...v20.10.22)

---
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>

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-12-19 15:20:49 +00:00
ChristopherHX 6ab71ecebb
fix: align runner.os / runner.arch to known values (#1510)
* fix: align runner.os / runner.arch to known values

* .

* .

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-19 14:58:55 +00:00
Aaron Holmes bef9b5c3c7
feat: Support "result" on "needs" context. (#1497)
* 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>
2022-12-19 08:37:53 +00:00
ChristopherHX 0c8c082ac0
fix: tail (not absolute) as entrypoint of job container (#1506)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-15 17:31:59 +00:00
ChristopherHX b8d7e947cf
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>
2022-12-15 17:08:31 +00:00
Markus Wolf a8e05cded6
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>
2022-12-15 16:45:22 +00:00
ChristopherHX d281230cce
refactor: fix add-path / GITHUB_PATH commands (#1472)
* 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>
2022-12-09 11:16:15 +00:00
ChristopherHX 7d9951200f
feat: JobLoggerFactory (#1496)
Remove overriding io.Stdout in TestMaskValues to prevent deadlock in GitHub Actions
2022-12-09 10:25:32 +00:00
Markus Wolf 0f8861b9e3
fix: handle env-vars case sensitive (#1493)
Closes #1488
2022-12-07 15:31:33 +00:00
ChristopherHX 8c5748a55c
fix: step env is unavailable in with property expr (#1458)
* 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>
2022-12-06 16:46:20 +00:00
ChristopherHX 57bf4d27a2
refactor: share UpdateFromEnv logic (#1457)
* 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>
2022-12-06 16:19:27 +00:00
ChristopherHX 4c2524ab4d
feat: `--container-options` (#1462)
* 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>
2022-12-06 15:58:47 +00:00
ChristopherHX d9fe63ec24
refactor: move autoremove into the jobexecutor (#1463)
* 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>
2022-12-06 15:45:06 +00:00