Commit Graph

114 Commits

Author SHA1 Message Date
Ikko Ashimine 108e3e0d51
Update README.md (#1260)
Github -> GitHub

Co-authored-by: Casey Lee <caseypl@amazon.com>
2022-07-25 12:24:40 +00:00
R e70b968924
fix: use docker images from dockerhub (#1249) 2022-07-08 00:21:51 +00:00
Eunsub LEE aea17b1aa6
Improve --eventpath example command (#1243) 2022-07-06 04:38:11 +00:00
Muhammad Hammad 6837307212
Improve docs for events inputs (#1238)
* Added documentation on how to pass inputs for workflows that require them

* Added the correct command to trigger the workflow

Co-authored-by: Casey Lee <caseypl@amazon.com>
2022-07-05 19:05:05 +00:00
Neo Hsu de37f75077
feat: add option to bypass GHE for actions checkout (#1162)
* feat(#1161): add --through-action to assigned actions from GitHub

* docs(flags): add --through-action and --through-action-token flags description

* test(action, remote): add test case for ThroughAction

* refactor(command): rename command from --through-action to --actions-from-github

* refactor(command): rename command from --actions-from-github to --replace-ghe-action-with-github-com
2022-06-21 13:52:21 +00:00
Jeff Levin bc0f09b9ea
update docs (#1180)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-24 20:49:12 +00:00
Ryan 69691c88b3
feat: add ubuntu-22.04 (#1150)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-05-17 19:11:33 +00:00
Guillaume Desforges 2d357853db
Update README.md (#1121)
Co-authored-by: Casey Lee <cplee@nektos.com>
2022-04-20 16:10:42 +00:00
Ryan e15f7a51c6
docs(README): remove go install (#1123)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
2022-04-19 19:51:26 +00:00
Herby Gillot 9a8a9aada2
README: add MacPorts badge (#1129) 2022-04-19 17:09:12 +00:00
Ryan 48db7d9c9d
deps: bump go.mod to go1.18 (#1088)
* deps: bump go.mod to go1.18

* deps: go mod tidy

* docs: update Go version requirement

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-30 17:06:04 +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
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
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 558081242c
feat: add node16 support (#922)
* feat: add node16 support

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

* feat: bump images to node16

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

* lint(editorconfig): ignore *.md due to mixed style

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-22 19:34:18 +00:00
Ryan 4e0ba618d3
fix: clarify --reuse and --rm flags (#929)
* fix: clarify --reuse and --rm flags

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

* lint(editorconfig): ignore *.md due to mixed style

Signed-off-by: hackercat <me@hackerc.at>
2021-12-16 05:11:56 +00:00
Ryan 8ad6c07083
feat: add option for docker image rebuild (#878)
Adds option to rebuild local action docker images

Fixed up README due to missing flags after
PR #714 and #716

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

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-24 07:51:37 -08:00
Ryan df4ef4de80
docs: add brew installation from HEAD (#886)
For folks who need latest fixes or "live on the edge"
2021-11-16 20:48:40 +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
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