Commit graph

146 commits

Author SHA1 Message Date
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
Ryan
2319eb210f
docs: fix brew formula link (#846)
currently it points to nektos owned tap but instruction is for homebrew-core
2021-10-31 13:34:15 +00:00
Ryan
17652ce80e
Remove ubuntu-16.04 and add missing links for nix/go (#821)
* fix: remove ubuntu-16.04

* fix: add missing links for nix/go

* fix: remove specific platform versions
2021-09-22 19:43:58 +00:00
Ryan
5c841e22ab
Update docs, file formatting and docker images (#766)
* docs: fix wrong licence link

* fix: add more formatting settings, reformat all

feat: add vscode extensions recommendations

* docs: update contributing documentation

* fix: remove unnecessary comment

it was due to broken checkout

* docs: rework installation section

it has been brought up few times, new style should be easier
to understand

* docs: update images provided by catthehacker

* docs: replace 18.04 with recent image

* fix: add final new line
2021-08-09 09:07:26 -07:00
Herby Gillot
4036b8a3b1
README: add MacPorts info (#762) 2021-08-01 15:29:13 +00:00
Derek Bender
c865a56c5a
Fix url typo in README.md (#746)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-07-14 14:40:09 +00:00
Dave Tapley
73b22a0da6
Add docker context workaround to readme (#749)
* Add docker context workaround to readme

* Update README.md

Co-authored-by: Ryan (hackercat) <me@hackerc.at>

* Fix README

MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [

Co-authored-by: Ryan (hackercat) <me@hackerc.at>
2021-07-07 18:41:23 +00:00
Ryan (hackercat)
a9fe038347
Update images, fix extrapath (#723)
* fix: typo

* fix: remove debug for git references

it generates a massive amount of logs

* feat: read values from env

allows to test act on GHA when it's not a main repo

* fix: merge extrapath with PATH

* fix(tests): add additional shells for testing

* fix(image): update images

pin node to major version only, current node version: 12.22.1
replace most images with `node:12-buster-slim` to prevent
errors on macOS runner due to DockerHub pull limit
replace ocaml image

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-06-10 23:12:05 +00:00
Ryan (hackercat)
799098b0e6
feat: add option for custom socket path (#698) 2021-05-23 14:43:09 +00:00
Oliver Kopp
3e22b1b374
Fix typo (#685)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-17 01:09:11 +00:00
Oliver Kopp
ee05fb1e1f
Add hint on ${{ github.token }} (#686) 2021-05-17 01:02:40 +00:00
Ryan (hackercat)
cc4e23d96c
fix: remove Windows issue from README.md (#675)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-06 13:16:24 -07:00
Ryan (hackercat)
37a98f134a
feat: add go install instruction (#672)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-05-06 13:43:50 +00:00
Björn Brauer
0c4374ec41
GitHub Enterprise support (#658)
* Add option to specify custom GitHub instance

* Use correct GHE API endpoint URLs

Co-authored-by: Markus Wolf <knister.peter@shadowrun-clan.de>

* Extract slug from GitHub Enterprise URLs

Co-authored-by: Markus Wolf <knister.peter@shadowrun-clan.de>

* Use GITHUB_TOKEN for clone authenticate if provided

This change will allow use authentication for cloning actions
from private repositories or github enterprise instances.

Co-Authored-By: Markus Wolf <knister.peter@shadowrun-clan.de>

* Add section about using act on GitHub Enterprise to README

Co-authored-by: Markus Wolf <knister.peter@shadowrun-clan.de>

* Set GitHubInstance in runnerConfig in runner_test

Co-authored-by: Markus Wolf <knister.peter@shadowrun-clan.de>

Co-authored-by: hackercat <me@hackerc.at>
Co-authored-by: Markus Wolf <knister.peter@shadowrun-clan.de>
2021-05-05 09:42:34 -07:00
Ryan (hackercat)
cec63488f3
Add super-linter + fix lint issues (#650)
* feat: bump `golangci-lint`, add `super-linter`, replace outdated linter

Bump `golangci-lint` version.
Add `super-linter` to lint other languages.
Go linter is disabled because it's currently broken:
https://github.com/github/super-linter/pull/370
Replacing `scopelint` with `exportloopref`: "[runner] The linter
'scopelint' is deprecated (since v1.39.0) due to: The repository of the
linter has been deprecated by the owner.  Replaced by exportloopref."
Fixed formatting in `.golangci.yml`
Add addtional linters:
  `misspell`: purely style, detects typos in comments
  `whitespace`: detects leading and trailing whitespace
  `goimports`: it's gofmt + checks unused imports

* fix: lint/fix `go` files

* fix: lint with `standardjs`

* fix: lint/fix with `markdownlint`, make template more verbose

* feat: add lint stuff to makefile

* fix: `UseGitIgnore` formatting

* fix: lint/fix `README.md`

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-05-03 09:52:03 -07:00
Ryan (hackercat)
08141f5b00
fix: update readme with more relevant/updated information (#630) 2021-05-03 07:41:30 -07:00
Ryan (hackercat)
7ae9916de0
Add option to allow files/directories in .gitignore to be copied to container (#537)
* disable gitignore for actions

* feat: Add option to allow/disallow paths specified in .gitignore

Co-authored-by: Alan Birtles <alan.birtles@eu.sony.com>
2021-05-03 07:37:20 -07:00
Ryan (hackercat)
f32babb51d
fix: reworked container architecture (#619)
- Don't set architecture, let Docker host decide it's own platform,
  remove `runtime` dependency and don't show default in `--help`
- Remove most tests, we need to check only once if it works on
  different platform
- Rename `DeleteImage` to `RemoveImage` to conform to existing
  function in `docker` cli, added options to specify `force` and
  `pruneChildren`
2021-05-02 08:15:13 -07:00
Johannes Nicolai
f56b21f6c3
Add nektos/act to awesome-runner curated list (#624) 2021-04-18 09:53:54 -07:00
Josh McSavaney
47e1ba1b55
Go 1.16 is required since 5752a03dc (#601) 2021-04-03 19:34:12 -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
72f2d2de51
fix: update ubuntu-latest to point to ubuntu-20.04 (#580)
GitHub Actions switched `ubuntu-latest` to `ubuntu-20.04`
Ref:
  https://github.com/actions/virtual-environments/issues/1816
  https://github.com/actions/virtual-environments/pull/2852
2021-03-28 21:47:07 -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
Alfredo Deza
f29b1f2523
Add more context to MODULE_NOT_FOUND errors and how to fix it (#552) 2021-03-12 16:15:27 -08:00
Hibariya
8de7b956b7
Add --userns flag to support Docker daemon that enables user namespace (#533)
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
hackercat
34dc2dc15c
Update Docker images (#524) 2021-02-23 09:49:24 -08:00
Johannes Nicolai
c4f1f3a1cf
Fix link to issue #97 in README.md (#541)
* fix link to issue #97 in README.md explaining why certain runner platforms are not supported
2021-02-23 09:45:28 -08:00
Cat™
fc46f506e3
Update README.md/cmd/root.go with additional information (#523)
* Update README

* Add notice about large image, add link to repo for `.actrc`
2021-02-08 09:12:57 -08:00
Cat™
b424a785e3
Load .secrets file as default (#488)
* Load .secrets file as default

* Update README
2021-01-19 06:31:46 -08:00
Cat™
9bbf35e88e
Add autodetect event flag (#486)
* Add autodetect event flag

* Add new flag to README.md

* Make help more clear
2021-01-18 11:42:55 -08:00
Cat™
460ed2db04
Update parts of repo (#476)
* Update flags in README

* Add secrets and `.env` files examples

* Fix typo: environment

* Fix typo: returned

* Add --version back, since I've built act without ldflags
2021-01-14 21:21:44 -08:00
Ibraheam
126cce3cfe
Fix/a small confusion in readme (#477)
* using ubuntu-18.04 instead of ubuntu-latest  when specifying platform -P flag in readme, it cause a little confusion

* fix a confusion in .actrc for the image name
2021-01-14 21:20:17 -08:00
Cat™
fecc571bce
Add Ubuntu 20.04 to supported platforms (#463)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-11 22:22:53 -08:00
Benjamin Cooper
e16e6ea1c8
Update README.md (#459) 2021-01-08 00:26:20 -08:00
Torbjørn Vatn
b3299ecd30
Act env (#417)
* 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

* Add an ACT env set to true

This can be used to skip certain steps that you don't want to run locally
when testing. E.g. steps that sends messages to Slack channels on successful
builds etc.

* Add a description about env.ACT to the readme

* A new attempt at Interpolation and EvalBool

* One small merge fix

* Remove some fmt.Printfs

* Fix some merge conflicts
2020-11-18 07:14:34 -08:00
Benjamin Räthlein
1e69525fb4
Update README.md (#399)
Add the command structure and another example for a non-default event command to make the usage more clear
2020-10-21 08:09:40 -07:00
jmmendivil
4791a9bc44
doc: add --secret-file example (#395) 2020-10-17 07:38:53 -07:00
Tom Payne
6fdf1b04ef
Fix Homebrew install instructions (#374) 2020-09-28 08:21:44 -07:00
Nicholas Nadeau, Ph.D., P.Eng
3ec15546bf
Added docker pull instructions 2020-07-26 11:25:14 -04:00
Strajk
4864ece107 Document secret-file in README and add example 2020-07-21 10:10:23 +02:00
Raj Nigam
f5e1bd45b3
Update unit test command to make test (#274) 2020-06-12 15:31:37 -07:00
Gabriel Joshua Paet
a3a85938ad
Added documentation for module not found issue. (#256)
* Added documentation for module not found issue.

* Linked the open issue #228.
2020-05-26 09:12:17 -07:00
Josh Soref
2bb9906425
Markup for runners (#241) 2020-05-18 09:54:59 -07:00
Josh Soref
2f3187ebcd
Grammar (#238)
* spelling: GitHub

* Spelling and grammar
2020-05-15 12:30:49 -07:00
Tomer Keren
320b0b8127
Add install instructions from Scoop (#183) 2020-04-16 16:22:47 -07:00
Yannik Sander
25e1ad687d
Include install instructions for nix (#152) 2020-03-13 07:55:20 -07:00
David Lozano Jarque
f6b761378a
docs(README): add --env-file flag (#147) 2020-03-12 09:54:05 -07:00
Casey Lee
b7fcf137ab
Fix 132 - support for chocolatey install (#144)
* fix #132 - publish chocolatey package for act

* add missing files to pass validation

* remove extra choco step
2020-03-09 17:49:55 -07:00
Jacob Turner
2157ef76e8
Add flags to README (#138)
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-03-06 17:06:07 -08:00
Jacob Turner
643f8d08b7
Add event documentation (#137) 2020-03-06 17:05:36 -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
e739f72c5e
Update README.md 2020-02-26 22:09:13 -08:00
Casey Lee
dadf8918be
documentation for .actrc 2020-02-24 22:16:00 -08:00
Casey Lee
418b0db047
reuse containers to fix #86 2020-02-20 22:43:20 -05:00
Casey Lee
80147e8b5b
new quickstart image
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:26 -05:00
Casey Lee
6834c5c96f
add warning
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:20 -05:00
Casey Lee
3d3fc59dbe
update for platforms
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:18 -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
409060c847
merge master
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:53 -05:00
Casey Lee
76b1c6a3f1
HCL syntax disclaimer on README
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:50 -05:00
Casey Lee
e29973becf
updates to readme for next act release
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:46 -05:00
Casey Lee
64562d41ab
test updates
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:44 -05:00
Bengt Brodersen
51bcd05909
doc: remove unnecessary brew command 2019-09-09 17:05:51 +02:00
Sven Lechner
59fb4b3b2c
add arch linux installation instructions
I've created an AUR package for act :)
2019-09-04 14:46:49 +02:00
Casey Lee
cb6bfde683
Merge branch 'master' into patch-2 2019-05-22 23:12:45 -07:00
Max Held
6fd3811ec6
explain how to run act with secrets
again, thought this might be helpful for other users.
**Caveat**: I'm not an InfoSec expert, so someone should look this over.
Don't want to encourage people to do stupid things.
2019-05-20 20:04:47 +02:00
Max Held
367ec0c61c
explain how to "skip" some actions using filter
I just figured this out; might be helpful for other users.
2019-05-20 19:49:10 +02:00
Chase Adams
4c09cbb045
s/pull-request/pull_request
pull-request isn't an event type but pull_request is!
2019-04-02 11:11:59 -07:00
Jaskaranbir Singh
07242b8c7a
Add info about verbose-switch to README 2019-02-17 15:06:45 -05:00
Kentaro Matsushita
4b2e1700f1
Fix an install command for brew 2019-02-03 18:39:47 +09:00
Casey Lee
1e0ec5280f
Merge branch 'master' of github.com:nektos/act 2019-01-23 06:10:19 -08:00
Casey Lee
365f7aefdd
readme update 2019-01-23 06:10:01 -08:00
Casey Lee
bb2f48af09
Update README.md 2019-01-22 07:33:20 -08:00
Sven Dowideit
df01d4fd8a Go 1.11.4+ and Docker 18.09 pre-reqs
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2019-01-21 18:32:36 +10:00
Casey Lee
3cdc039201
readme update 2019-01-18 18:19:26 -08:00
Casey Lee
c108a0f5a1
Merge branch 'master' of github.com:nektos/act 2019-01-18 18:18:29 -08:00
Casey Lee
0f4c8f455f
readme update 2019-01-18 18:18:11 -08:00
Tyler Buchea
a23bd812b5
Update README.md
Pretty minimal changes, I removed some extra spaces and corrected a typo in the "How Does It Work?" paragraph "the" -> "then".
2019-01-18 13:05:29 -08:00
Casey Lee
36303ce43d
readme update 2019-01-18 09:01:01 -08:00
Casey Lee
ad65ee36ac
readme update 2019-01-18 08:57:01 -08:00
Casey Lee
dc81b37dd0
readme update 2019-01-18 08:56:19 -08:00
Casey Lee
e06deccd5e
readme update 2019-01-18 08:37:26 -08:00
Casey Lee
56aa488867
readme update 2019-01-18 08:35:57 -08:00
Casey Lee
8a1c1edf10
readme update 2019-01-18 08:33:52 -08:00
Casey Lee
766b7d2070
readme update 2019-01-18 08:32:55 -08:00
Casey Lee
beba1ad1e3
readme update 2019-01-18 08:31:35 -08:00
Casey Lee
aa13b69262
readme update 2019-01-18 08:28:34 -08:00
Casey Lee
54b93d7547
readme update 2019-01-18 08:28:09 -08:00
Casey Lee
8793c8a6a4
add support for 'reuse' mode to allow act to be used for a fast local task runner 2019-01-17 14:53:35 -08:00
Casey Lee
28af42867a
fix #6 - update the example for running a specific action 2019-01-15 21:44:17 -08:00
Casey Lee
c668a410c3
readme update 2019-01-15 08:26:10 -08:00
Casey Lee
b6d7851105
readme update 2019-01-15 08:25:50 -08:00
Casey Lee
aa8209e7d8
readme 2019-01-15 00:32:19 -08:00
Casey Lee
f683af5954
Initial commit with support for GitHub actions 2019-01-12 20:45:25 -08:00
Casey Lee
d136b830f2
Initial commit 2019-01-02 11:53:43 -08:00