Commit Graph

56 Commits

Author SHA1 Message Date
dependabot[bot] eedac179c9
build(deps): bump github.com/opencontainers/image-spec (#954)
Bumps [github.com/opencontainers/image-spec](https://github.com/opencontainers/image-spec) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/opencontainers/image-spec/releases)
- [Changelog](https://github.com/opencontainers/image-spec/blob/main/RELEASES.md)
- [Commits](https://github.com/opencontainers/image-spec/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/image-spec
  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-01-26 07:30:10 +00:00
dependabot[bot] bbf6b7e080
build(deps): bump github.com/docker/cli (#956)
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 20.10.10+incompatible to 20.10.12+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v20.10.10...v20.10.12)

---
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: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-26 07:22:06 +00:00
Björn Brauer eba71f98fe
Refactor expression evaluator to use parser from actionlint package (#908)
* feat: implement expression evaluator

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>

* feat: integrate exprparser into act

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>

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

* Fix empty inputs context

* fix: contains() comparison for complex values

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
Co-authored-by: Philipp Hinrichsen <philipp.hinrichsen@new-work.se>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
2022-01-21 08:07:20 -08:00
Vladimir Romashchenko f7263399b9
feat: SELinux lables for --bind (#906) 2021-11-26 05:18:31 +00:00
dependabot[bot] c26e661889
build(deps): bump github.com/go-ini/ini from 1.63.2 to 1.64.0 (#882)
Bumps [github.com/go-ini/ini](https://github.com/go-ini/ini) from 1.63.2 to 1.64.0.
- [Release notes](https://github.com/go-ini/ini/releases)
- [Commits](https://github.com/go-ini/ini/compare/v1.63.2...v1.64.0)

---
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>
2021-11-15 14:33:01 +00:00
Ryan ec34eb9532
fix: use docker lib for image ref parsing (#877)
Signed-off-by: hackercat <me@hackerc.at>
2021-11-13 19:35:45 +00:00
Markus Wolf 11f6ee37a6
Asset server implementation (#677)
* Add asset server and upload handling of binary files

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* Add asset download parts to the asset server

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* 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 <zaubernerd@zaubernerd.de>

* Move ACTIONS_RUNTIME_* vars into the withGithubEnv setup

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* 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 <bjoern.brauer@new-work.se>

* test: add artifact server tests

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>

* 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 <bjoern.brauer@new-work.se>

* test: add artifact integration test

* chore: run act tests with asset server path

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>

* docs: add new cli flags

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>

* 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 <zaubernerd@zaubernerd.de>

* 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 <zaubernerd@zaubernerd.de>

* fix: close server if graceful shutdown failed

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: ignore server closed error from listen call

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
2021-11-10 09:57:22 -08:00
dependabot[bot] f8b3563102
build(deps): bump github.com/moby/buildkit from 0.9.1 to 0.9.2 (#864)
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/moby/buildkit/releases)
- [Commits](https://github.com/moby/buildkit/compare/v0.9.1...v0.9.2)

---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
  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>
2021-11-10 09:54:38 -08:00
dependabot[bot] 6a3a47c217
build(deps): bump github.com/docker/docker (#855)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.8+incompatible to 20.10.10+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.8...v20.10.10)

---
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>
2021-11-01 01:38:50 +00:00
dependabot[bot] 50dd0c0db1
build(deps): bump github.com/docker/cli (#854)
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 20.10.8+incompatible to 20.10.10+incompatible.
- [Release notes](https://github.com/docker/cli/releases)
- [Commits](https://github.com/docker/cli/compare/v20.10.8...v20.10.10)

---
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>
2021-10-31 16:20:06 +00:00
dependabot[bot] b5e8a18683
build(deps): bump github.com/moby/buildkit from 0.9.0 to 0.9.1 (#838)
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/moby/buildkit/releases)
- [Commits](https://github.com/moby/buildkit/compare/v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
  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>
2021-10-18 20:24:05 +00:00
dependabot[bot] bfcf0abd73
build(deps): bump github.com/joho/godotenv from 1.3.0 to 1.4.0 (#824)
Bumps [github.com/joho/godotenv](https://github.com/joho/godotenv) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/joho/godotenv/releases)
- [Commits](https://github.com/joho/godotenv/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/joho/godotenv
  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: Casey Lee <cplee@nektos.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-26 16:47:33 +00:00
Ryan 5a09eb24ca
Bump all dependencies (and fix dependabot mess) (#822)
* build(deps): bump all Go deps

* build(deps): bump actions/setup-go & actions/stale
2021-09-25 12:13:22 -07:00
dependabot[bot] 6d7f574859
build(deps): bump github.com/go-git/go-billy/v5 from 5.0.0 to 5.3.1 (#802)
Bumps [github.com/go-git/go-billy/v5](https://github.com/go-git/go-billy) from 5.0.0 to 5.3.1.
- [Release notes](https://github.com/go-git/go-billy/releases)
- [Commits](https://github.com/go-git/go-billy/compare/v5.0.0...v5.3.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-10 15:34:10 +00:00
Marcin Falkowski 9126f15aa2
support for container option: --hostname (#809) 2021-09-10 05:03:40 +00:00
dependabot[bot] a7a2659c0e
build(deps): bump github.com/AlecAivazis/survey/v2 from 2.2.7 to 2.3.1 (#803)
Bumps [github.com/AlecAivazis/survey/v2](https://github.com/AlecAivazis/survey) from 2.2.7 to 2.3.1.
- [Release notes](https://github.com/AlecAivazis/survey/releases)
- [Commits](https://github.com/AlecAivazis/survey/compare/v2.2.7...v2.3.1)

---
updated-dependencies:
- dependency-name: github.com/AlecAivazis/survey/v2
  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>
2021-09-08 14:52:34 +00:00
Ryan 4c645b3ed9
Update Go to 1.17 (#787)
* 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 <cplee@nektos.com>
2021-08-30 11:06:20 -07:00
Ryan (hackercat) f571290b25
refactor: remove `gotest.tools` (#688)
* 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
2021-05-17 23:14:49 -07:00
Ryan (hackercat) a6a865e973
fix: replace `gopass` lib with `golang.org/x/term` (#674)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-06 20:13:14 +00:00
Markus Wolf a07cb440c2
Write git clone progress only if terminal is a TTY (#670) 2021-05-06 06:55:23 -07:00
hackercat 4125812a63
Refactor `.actrc` locations and default image survey (#600)
* 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
2021-04-05 08:51:13 -07:00
Josh Soref 5752a03dcd
Support running commands in repositories without action.yaml (#293)
* 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 <cplee@nektos.com>
2021-03-30 12:26:25 -07:00
Jay Pipes d67e282f68
use container image platform only on docker 1.41+ (#591)
Commit af5140f13e 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
2021-03-30 10:10:42 -07:00
hackercat 6c258cf40d
Add option to run custom architecture (container platform) (#525)
* 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 <cplee@nektos.com>
2021-03-28 21:08:40 -07:00
Kamil Domański 475a6aa1d0
properly parse arguments to Docker container steps (#539) 2021-02-23 09:47:06 -08:00
Cat™ 6130460c40
Add survey during first run for a default image (#483)
* Add survey during first run for a default image

* few minor formatting updates

* Use image from DockerHub

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-19 06:30:17 -08:00
KADOTA, Kyohei 6e1cdeefc0
Fix "reference not found" error on checkout (#433) (#471) 2021-01-14 21:24:17 -08:00
Torbjørn Vatn 15eaa15a0e
GitHub env file support (#426)
* 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
2021-01-11 22:39:43 -08:00
Torbjørn Vatn 3f4998a4ed
envs in if: - take 2 (#412)
* 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
2020-11-12 08:15:09 -08:00
Yoan Blanc 3eef111e46
chore: upgrade docker v19.03.12 (#348)
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-29 22:55:22 -07:00
Casey Lee 85f89e16eb
fix docker build issue on windows 2020-08-28 12:31:16 -07:00
Yoan Blanc b3b8961122
feat: docker 19.03.12 (#347)
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-28 11:45:03 -07:00
Sven Dowideit 6196436f70
extract the docker NewClientWithOpts, and add connectionhelper for DOCKER_HOST set to ssh://remote (#207)
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-05-03 21:15:42 -07:00
Máximo Cuadros f6e37a8d67
*: update go-git import (#194) 2020-04-16 16:24:30 -07:00
Aidan Steele bf3824cc10
Improved gitignore handling (#163) 2020-03-18 06:55:39 -07:00
Casey Lee 7f88f81bf6
fix #50 - exclude anything in .gitignore from being copied into the job volume 2020-03-09 18:32:48 -07:00
Casey Lee bd6f232b20
fix build for windows 2020-03-06 17:08:07 -08:00
chenrui ca648a37c8
chore(deps): cleanup go.mod a little bit (#136)
* Upgrade docker to v19.03.7

* go mod vendor

* golangci-lint 1.23.8
2020-03-06 14:37:54 -08:00
chenrui c588c07ce7
Bump golang to v1.14 (#135)
* Bump golang to v1.14

* go mod vendor

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-03-06 14:21:24 -08:00
Casey Lee 4fde7d8865
fix #121 and #123 - add support for reading env variables from .env (#133) 2020-03-06 12:30:24 -08:00
Casey Lee 1d84ee0db1
fix #102 - add windows support 2020-02-25 09:22:59 -08:00
Casey Lee 573f78e1b4
support for secrets
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:09 -05:00
Casey Lee e40ab0145f
expressions working
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:55 -05:00
Casey Lee ac8258db4b
support list/map/scalar for on and needs
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:34 -05:00
Casey Lee 532af98aef
successfully able to run simple workflows
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:25 -05:00
Casey Lee 8c49ba0cec
initial load of yaml working 2020-02-04 16:38:41 -08:00
Casey Lee b5159281f9
update vendor 2019-05-23 08:46:23 -07:00
Jesse Newland 3198627879 --watch 2019-02-09 20:39:09 -06:00
Casey Lee 4b61fb3bc3
pin to v1.0.0 of github action parser 2019-02-06 22:36:16 -08:00
Casey Lee 3e04312912
update to latest version of action parser 2019-02-06 22:36:15 -08:00