Commit Graph

24 Commits

Author SHA1 Message Date
Josh Soref
5752a03dcd Support running commands in repositories without action.yaml ()
* 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
hackercat
6c258cf40d Add option to run custom architecture (container platform) ()
* 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
Hibariya
8de7b956b7 Add --userns flag to support Docker daemon that enables user namespace ()
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 <cplee@nektos.com>
2021-02-27 08:31:25 -08:00
Cat™
80a245652e Add option to disable hiding of secrets () 2021-01-11 22:28:45 -08:00
Tom Lazar
7d443c6520 Set the default branch inside the event data ()
* set ${{github.event.repository.default_branch}}

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

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-09-02 07:56:44 -07:00
whywaita
24bdb024bf add flag of privileged mode 2020-08-02 05:21:49 +09:00
Michael Heap
d3f25bac79 Mask secrets in job output ()
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 <cplee@nektos.com>
2020-05-13 15:22:31 -07:00
Michael Heap
a5e86bd024 Add support for changing the GITHUB_ACTOR ()
This adds the `-a` flag when running `act` to change the username of the GITHUB_ACTOR environment variable

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-05-12 00:14:56 -07:00
jony montana
2f395475b0 feat: load every environment from --env-file to workflow ()
* 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 <cplee@nektos.com>
2020-04-17 10:04:40 -07:00
Casey Lee
59b9b8e97a fix - ensure container names are unique for matrix runs 2020-03-04 16:24:14 -08:00
Casey Lee
21e2bb8657 fix - support matrix expressions in job name () 2020-02-26 23:29:43 -08:00
Casey Lee
1121f6e132 run with copy of workingdir 2020-02-24 17:48:21 -08:00
Casey Lee
01876438c2 shared container for job 2020-02-23 15:01:25 -08:00
Casey Lee
543501a36a add support to override platform
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:15 -05: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
9651992584 code complexity of NewPlanExecutor
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:07 -05:00
Casey Lee
60be2d67c1 align name of job in output
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:05 -05:00
Casey Lee
f8fb88816a matrix is done
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:03 -05:00
Casey Lee
5b7019cd0b skip unsupported platforms
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:01 -05:00
Casey Lee
73559207c7 initial support for expressons
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:59 -05:00
Casey Lee
64562d41ab test updates
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:44 -05:00
Casey Lee
033168228b cleanup logging
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:40 -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