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

16 commits

Author SHA1 Message Date
Cat™
078494e07c Make all secrets case insensitive by formatting them to uppercase (#470)
* Uppercase secrets, print error when secret with same name already exists

* Test lower-to-upper case formatting for secrets
2021-01-12 09:54:53 -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
Torbjørn Vatn
1ae5c19aa4 EvalBool and Interpolation fixes (#424)
* A new attempt at Interpolation and EvalBool

* One small merge fix

* Remove some fmt.Printfs
2020-11-17 09:31:05 -08:00
Torbjørn Vatn
d752f1e2b9 envs in if: - take 2 (#412)
* 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
2020-11-12 08:15:09 -08:00
Peter Tissen
4b00c2754d Add variadic version of hashFiles (#411) 2020-11-09 09:08:57 -08:00
Javier Romero
76c46ef07a Fix path for local node12 actions (#371)
Fixes #185

Signed-off-by: Javier Romero <root@jromero.codes>
2020-09-29 13:39:45 -07:00
Owen
8d723eb376 feat: add fromJSON support (#352) 2020-09-01 13:55:29 -07:00
Amit Mahbubani
922820f56e Fix comments on StepType enum consts (#304) 2020-07-13 09:39:23 -07:00
Ayaz BADOURALY
f4dcbab826 Rewrite contexts before evaluating them (#287)
* Rewrite contexts before evaluating them

* Precompile context and expression patterns

* Test trim before rewrite

The current contextPattern is quite constraining and would fail the
rewrite of a context with trailing spaces. Triming happens during the
execution of Interpolate, and these tests aim to detect future breaking
changes on this behavior.

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-06-24 07:08:45 -07:00
Stan Wohlwend
f84aa60a04 Fix container volumes being reused sometimes (#283) 2020-06-18 08:21:55 -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
Casey Lee
33561d42d3 fix #115 - support toJson and toJSON (#116) 2020-02-28 15:20:31 -08:00
Casey Lee
66ae15cfc5 gofmt 2020-02-25 16:58:26 -08:00
Casey Lee
b8589c4e9b initial support for expressons
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:59 -05:00
Casey Lee
7183c74cd0 fix tests
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:57 -05:00
Casey Lee
e67e06809c expressions working
Signed-off-by: Casey Lee <cplee@nektos.com>
2020-02-20 21:05:55 -05:00