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

524 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
KADOTA, Kyohei
501e2e4d5f Fix "reference not found" error (#433)
If an action uses the branch to pin the major version, `- use: user/action@v1`
will stop with an error: "v1: reference not found."

In this case `act` should use refs/remotes/origin/v1 as a name to resolve v1 revision.

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-11 22:47:33 -08:00
Cat™
9cb63f0bd6 Fix slashes when running on Windows (#461) 2021-01-11 22:41:35 -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
KADOTA, Kyohei
0fe34092d1 Fix tests if there are hooks generated by templates (#434)
If there are custom hooks in ~/.git_template/hooks,
they can occur an error on such as pre-commit hooks.

Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-11 22:35:57 -08:00
Cat™
49cce55058 Add option to disable hiding of secrets (#460) 2021-01-11 22:28:45 -08:00
Cat™
e3c2db48e9 Use static initial PATH (#462) 2021-01-11 22:27:16 -08:00
Cat™
889a41562e Add Ubuntu 20.04 to supported platforms (#463)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-11 22:22:53 -08:00
Steffen Seckler
b4f337a5c3 Fixes include when using matrix and strategy build. (#415)
* fixes include directive of strategy build.

* Adds test for include and exclude in matrix builds.

* ubuntu-16.04 instead of 20.04

* Adds more platforms for runner_test

Prevent most "skipping unsupported platform messages".

* correct printing for unsupported platform

* fix merge
2020-12-08 10:13:07 -08:00
Wink Saville
2202cd3cba Extract runTestJobFile from TestRunEvent (#429)
This will allow other tests to be created in runner_test.go that can
be tested individually.
2020-11-29 21:45:11 -08:00
Torbjørn Vatn
532500b3f5 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
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
Steffen Seckler
88978fc12b Adds ability to use container images from matrices. (#413)
Uses rc.ExprEval.Interpolate on container image.
2020-11-10 14:55:27 -08:00
Peter Tissen
4b00c2754d Add variadic version of hashFiles (#411) 2020-11-09 09:08:57 -08:00
Casey Lee
3dbfe0ed90 increase operations per run 2020-11-08 08:31:19 -08:00
Casey Lee
c6c6bd2f8e remove stale label when comments added 2020-11-08 08:23:53 -08:00
Wink Saville
5635645200 Use PathListSeparator (#408)
In PR #406 I used PathSeparator and I should have used PathListSeparator.
 See: https://golang.org/pkg/os/#pkg-constants
2020-11-04 11:54:48 -08:00
Wink Saville
4119f3b80d Change handling of ExtraPath (#406)
To make the handling of ExtraPath portable append it to the front of the
PATH when it exists, instead of always changing the script.
2020-11-02 13:56:20 -08:00
Owen Young
4282e53b56 fix: outputs espace (#404)
* fix: outputs espace

* refactor: move unescape to func

* refactor: fix ci lint

* refactor: unescape function
2020-11-02 05:40:46 -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
Taliesin Sisson
222377d1d5 When running on Windows the correct path separator must be used (#386)
* When running on Windows the correct path separator must be used. filePath.join is OS aware, so when we want to use forward slash use path.join instead.

on windows docker cp should end with \. when copying a directory
when running npm modules we should pass in path with all forward slashes

This fixes #331

* When calculating relative folders on Windows for destination path on Linux, we need to change \ for /

* Reduce complexity by extracting methods

* V1 does not point to a file that does not exist

* Looks like something else is the cause of this test breaking. Last successful build is #371, builds after that are failing
2020-10-08 22:30:50 -07:00
David Beck
249e1a5851 [Add] More logging for default push action (#383) 2020-10-08 22:28:01 -07:00
Lyle Underwood
d36a3f80c7 Remove confusing message about symlinks (#381) 2020-10-06 10:02:37 -07: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
Leonardo Dino
728caae607 Add CI=true environment variable (#372)
fixes #333
see https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
2020-09-28 08:22:42 -07:00
Owen
bd0c8047f1 feat: support custom GITHUB_RUN_ID, GITHUB_RUN_NUMBER (#369)
* feat: add fromJSON support

* feat: support custom runId and runNumber

* chore: manual update

* chore: lint
2020-09-22 14:13:29 -07:00
Bar Weiss
4e7bcf23b6 Fix copyDir to normalize file paths in tar archive (#360) 2020-09-15 07:00:15 -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
Owen
8d723eb376 feat: add fromJSON support (#352) 2020-09-01 13:55:29 -07:00
Cameron Booth
80d5153dc3 Special case handling of empty workflow files for user experience (#349)
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-08-31 14:50:01 -07:00
Yoan Blanc
3e71b12c01 chore: upgrade docker v19.03.12 (#348)
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
2020-08-29 22:55:22 -07:00
Casey Lee
0fa58c16bd update actions/stale to remove stale when issues are updated 2020-08-28 11:56:20 -07:00
Julian Squires
95240475c3 Support setting shell via defaults.run (#343)
Note that we don't support the more general use of defaults, just its
run key for setting shell and working directory.

The documentation for defaults.run is here:
  https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun

Fixes #214.

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-08-28 11:52:25 -07:00
watiko
7f17e0a9f4 fix file permission for non root user docker image (#334) 2020-08-08 13:31:26 -07:00
Casey Lee
148d159f73 Merge pull request #327 from whywaita/feat/add-privileged-mode
add privileged mode
2020-08-02 21:53:59 -07:00
Casey Lee
ea85122b05 Merge branch 'master' into feat/add-privileged-mode 2020-08-01 19:05:56 -07:00
Tachibana waita
35affcf3e7 actions/hello-world-javascript-action@master moved to main, use stable tag (#326) 2020-08-01 19:05:25 -07:00
whywaita
4d237924ac add flag of privileged mode 2020-08-02 05:21:49 +09:00
Casey Lee
0049033470 Merge pull request #314 from Strajk/secret-file-docs
Document `secret-file` in README and add example
2020-07-21 06:51:33 -07:00
Casey Lee
1755104d21 Merge branch 'master' into secret-file-docs 2020-07-21 06:51:21 -07:00
Casey Lee
8745cd2d9f Merge pull request #313 from denysvitali/feature/fix-defaults
fix: add default values in vmInput
2020-07-21 06:50:14 -07:00
Strajk
6bdb714a0f Document secret-file in README and add example 2020-07-21 10:10:23 +02:00
Denys Vitali
1cf168c165 fix(test): adapt to sjw change 2020-07-20 21:43:36 +02:00
Denys Vitali
e37c3699ff fix: add default values in vmInput 2020-07-20 21:17:49 +02:00
Stephen Solka
82f979b8b9 use t.Cleanup and prefer assert.NoError over .Nil (#309)
Co-authored-by: Casey Lee <cplee@nektos.com>
2020-07-20 07:35:43 -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
Josh Soref
0e18c4dd43 Properly pass format argument to avoid MISSING (#290)
#273
2020-06-24 07:05:05 -07:00
Jeremy Lempereur
63b3391483 remove .gitignore before docker cp (#288)
* Test setup before I try to understand how things work

* Remove .gitignore before we run docker cp
2020-06-23 11:57:24 -07:00