1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-06 17:40:58 +00:00
Commit graph

93 commits

Author SHA1 Message Date
Jay Pipes
6d023b011e use container image platform only on docker 1.41+ (#591)
Commit fef399d057 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
e643c2625e fix: use new platforms after survey, check working dir for .actrc (#577) 2021-03-29 07:58:00 -07:00
hackercat
fb937040ab 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
391acea9e2 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
Hibariya
fa4c3c59cb 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
cd42d0301a Update Docker images (#524) 2021-02-23 09:49:24 -08:00
Cat™
1206c3348a 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
Owen Young
02c64bbcbf fix: --version, --help do not need check platform config (#508) 2021-01-29 06:40:13 -08:00
Cat™
7daeb6ea59 Load .secrets file as default (#488)
* Load .secrets file as default

* Update README
2021-01-19 06:31:46 -08:00
Cat™
2cda44747c 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
Cat™
0f5e9b0a60 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™
7987e67c0a Add --env flag to pass environment vars without file (#474) 2021-01-14 21:26:01 -08:00
Torbjørn Vatn
b60851b818 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
Cat™
49cce55058 Add option to disable hiding of secrets (#460) 2021-01-11 22:28:45 -08:00
lshamis
e8f6b1bb3d Simpler list view (#382)
* Simpler list view

* lint

* readding graph viz with -g/--graph

Co-authored-by: Leonid Shamis <lshamis@bob.localdomain>
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-10-12 10:26:22 -07:00
Tom Lazar
2e09dfac74 Set the default branch inside the event data (#354)
* 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
4d237924ac add flag of privileged mode 2020-08-02 05:21:49 +09:00
Strajk
6bdb714a0f Document secret-file in README and add example 2020-07-21 10:10:23 +02:00
Dylan Arbour
ed64e6193c Change -W command to accept a single file
Currently setting workflows with the -W (--workflows) flag only accepts
a folder. It is not possible to run a single workflow.yml file.

This commit allows either a single file or a directory to be passed into
the workflows flag.
2020-05-26 23:29:50 -04:00
Michael Heap
b9851b2453 Add support for changing the GITHUB_ACTOR (#229)
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
3bb919f266 feat: load every environment from --env-file to workflow (#184)
* 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
Aidan Steele
3d2d690bb1 Use “push” event workflow(s) if defined (closes #156) (#157) 2020-03-15 22:29:13 -07:00
Casey Lee
f9befb34a3 fix #121 and #123 - add support for reading env variables from .env (#133) 2020-03-06 12:30:24 -08:00
Steffen Schmitz
ed7e10bf8f fix #117 - handle whitespace in actrc secrets (#118)
* fix #117 - handle whitespace in actrc secrets

* Switch to raw string on regex pattern

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-03-02 08:11:46 -08:00
Casey Lee
f28cd9e692 fix #89 - support .actrc file 2020-02-24 22:11:33 -08:00
Casey Lee
199c125522 run with copy of workingdir 2020-02-24 17:48:21 -08:00
Casey Lee
ebe7dfdaf3 update for platforms
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:18 -05:00
Casey Lee
47376f8009 add support to override platform
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:15 -05:00
Casey Lee
0094b96051 support for secrets
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:09 -05:00
Casey Lee
33f5b5416c matrix is done
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:03 -05:00
Casey Lee
12ac03a755 skip unsupported platforms
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:06:01 -05:00
Casey Lee
eb7e10e86b test updates
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:44 -05:00
Casey Lee
2818130313 ci tests
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:36 -05:00
Casey Lee
33f8290eb3 successfully able to run simple workflows
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:25 -05:00
Casey Lee
fbab49c68d initial load of yaml working 2020-02-04 16:38:41 -08:00
Marc Campbell
08fd9db73c Add flag to skip pulling images already present 2019-02-18 21:12:35 -08:00
Dan Sosedoff
619277e6b6 Detect workflow event type 2019-02-15 10:34:19 -06:00
Casey Lee
73d6539b8c feedback from PR on --watch 2019-02-12 23:35:04 -05:00
Jesse Newland
5bffacf271 --watch 2019-02-09 20:39:09 -06:00
Casey Lee
ff392444a4 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
f26a1a3f0c refactor actions to improve testability 2019-01-17 14:53:35 -08:00
Casey Lee
2c27f29e64 fix #7 - allow passing a custom event.json to be populated in the container filesystem 2019-01-16 13:11:32 -08:00
Casey Lee
957282b8bc Initial commit with support for GitHub actions 2019-01-12 20:45:25 -08:00