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

371 commits

Author SHA1 Message Date
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
Josh Soref
2df2727f1a Fix using: node12 handling (#243)
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-05-18 14:31:09 -07:00
Josh Soref
72c3bf2220 Spelling (#240)
* spelling: cartesian

* spelling: deferring

* spelling: marshal
2020-05-18 09:53:42 -07:00
Michael Heap
02d5cbebae Mask secrets in job output (#231)
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
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
Torbjørn Vatn
09c4c76744 Make envs available in if conditionals (#225)
* Ignore .idea

* Add Env to the RunContext vm so we can Evaluate and Interpolate `env.xx`

* Make EvalBool support expressions more in line with the github runner

* Turns out Boolean(value) is what github is doing after all

* Add test for github context as well
2020-05-04 12:18:13 -07:00
Michael Heap
18bc8ff929 Implement UnmarshalYAML for ActionRunsUsing (#223)
In #222 I added case normalisation to ReadAction() to ensure that Docker and docker are interpreted the same way.

I realised that this was being done at the wrong level and required multiple type conversions. By implementing `func (a ActionRunsUsing) UnmarshalYAML` we can lowercase the string as it's being unserialized

This has an added benefit that any time this type is hydrated the `runs.using` key will be lowercased, rather than relying on `ReadAction()`
2020-05-04 05:40:11 -07:00
Sven Dowideit
dea1ed5769 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
Michael Heap
a09b46b898 Normalise Runs.Using to lowercase (#222)
Currently, providing `using: Docker` is an error as the switch statement in `step_context.go` is case sensitive.

Actions run successfully on GitHub with `using: Docker` leading me to believe that they're case insensitive. This commit updates `act` to match

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-05-03 20:59:13 -07:00
Michael Heap
c9b0a309da Add default error case for Runs.Using (#221)
The string comparison in `step_context.go` is currently case sensitive. This commit adds an error that returns the valid options and tells the user what value they passed
2020-05-03 20:55:20 -07:00
Casey Lee
7ff4970948 fix: #170 add RUNNER_TEMP 2020-04-23 08:18:36 -07:00
Casey Lee
862d198040 fix: #170 #171 - add RUNNER_OS and RUNNER_TEMP 2020-04-22 23:57:36 -07:00
Casey Lee
8611e2a3d2 fix: ignore symlink errors 2020-04-22 23:48:25 -07:00
Casey Lee
9253d2102c fix: #182 - support symlinks in workspace 2020-04-22 23:24:31 -07:00
Casey Lee
e26a741cb7 fix: 168 include error message from docker SDK 2020-04-22 23:04:28 -07:00
Juan Eugenio Abadie
7ee0450e69 Use env variables in Action.Runs.Env (#201)
* Use env variables in Action.Runs.Env

* Use Action.Runs.Env in all the cases
2020-04-19 11:29:34 -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
Máximo Cuadros
5e7ec329bd *: update go-git import (#194) 2020-04-16 16:24:30 -07:00
Alberto Fernández
479dc5b094 Remove length constraint (#190) 2020-04-16 16:05:00 -07:00
Aidan Steele
249ebdb066 Improved gitignore handling (#163) 2020-03-18 06:55:39 -07:00
Aidan Steele
25134089ee Add support for runs-on array form (closes #146) (#155)
* Add support for runs-on array form (closes #146)

* Fixed style issues

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-03-16 14:58:10 -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
e1ffc92e86 fix #150 - disable dryrun in git clone 2020-03-14 00:13:18 -07:00
Aidan Steele
1a3ec6c470 Add support for step.working-directory (closes #149) (#154) 2020-03-14 00:00:37 -07:00
Casey Lee
41dabfd633 add file info to files cp into container 2020-03-13 23:21:25 -07:00
Casey Lee
e3ad34295b support nested expressions 2020-03-12 17:22:33 -07:00
Casey Lee
96f6ad0f43 fix #50 - exclude anything in .gitignore from being copied into the job volume 2020-03-09 18:32:48 -07:00
Casey Lee
99b5da6086 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
Casey Lee
e60c46b79f fix #122 - support actions/checkout for repos other the one for this workflow (#143) 2020-03-09 17:45:42 -07:00
Casey Lee
caba9f7645 fix #141 - use host network to match GitHub Actions runners (#142) 2020-03-09 17:43:24 -07:00
Casey Lee
9ce7657839 fix build for windows 2020-03-06 17:08:07 -08:00
chenrui
cf841846fd 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
Casey Lee
3dada9d51a go mod update 2020-03-06 14:30:23 -08:00
Casey Lee
c62b7b5a64 go mod tidy 2020-03-06 14:23:05 -08:00
chenrui
32094d3dd7 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
cc19e1e341 fix #134 - include base_ref and head_ref in github context from the event json 2020-03-06 14:17:57 -08:00
Casey Lee
8f6d32db71 fix #134 - support 'env' context in steps 2020-03-06 13:39:01 -08: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
Casey Lee
c64bbd5c93 fix #127 - force eval as a boolean (#131) 2020-03-06 11:30:39 -08:00
Casey Lee
965f86d04e tone down verbosity 2020-03-06 10:25:18 -08:00
Casey Lee
ec337ae5cf fix #128: guard against empty actionName when 'uses: ./' (#130)
* fix #128: guard against empty actionName when 'uses: ./'

* fix #129 - force image name to be lowercase
2020-03-06 10:17:20 -08:00
Casey Lee
f5fac4b8b9 fix #108 - ensure container names are unique for matrix runs 2020-03-04 16:24:14 -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
8084ccfb58 run on push and pull_request 2020-03-02 08:04:30 -08:00
Casey Lee
33561d42d3 fix #115 - support toJson and toJSON (#116) 2020-02-28 15:20:31 -08:00
Casey Lee
85fde9ee94 manage stale issues in GH actions 2020-02-28 09:35:29 -08:00
Casey Lee
afb034b246 fix #110 - support path in action (#111) 2020-02-27 14:17:01 -08:00
Casey Lee
e7515df4b1 fix #108 - support matrix expressions in job name (#109) 2020-02-26 23:29:43 -08:00
Casey Lee
66ae15cfc5 gofmt 2020-02-25 16:58:26 -08:00
Casey Lee
8484985124 Merge branch 'master' of github.com:nektos/act 2020-02-25 09:23:05 -08:00