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

352 commits

Author SHA1 Message Date
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
Stan Wohlwend
f84aa60a04 Fix container volumes being reused sometimes (#283) 2020-06-18 08:21:55 -07:00
Michael Heap
555cdcebbb Pull latest changes from ref using cached repo (#267)
* Pull latest changes from ref using cached repo

Act switched from checking out a branch to checking out
a hash in order to resolve #24 - see
4e66f2c8be

This had a side effect of preventing `w.Pull()` from updating
to the latest commit if a ref was a branch/tag and the repo
already exists on disk.

This commit checks if input.Ref is equivalent to the resolved
hash, and runs `r.Fetch()` and checks out the branch for input.Ref
if it is different. `w.Pull()` can then pull the latest changes
before we checkout `*hash` again like normal

* Extract CloneIfRequired to reduce cyclomatic complexity

Co-authored-by: Casey Lee <cplee@nektos.com>
2020-06-09 07:43:26 -07:00
Casey Lee
509effef99 Merge pull request #259 from arbourd/set-single-workflow
Change -W command to accept a single file
2020-05-27 07:35:59 -07: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
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