Commit Graph

319 Commits

Author SHA1 Message Date
Cat™ 8339f4b404
Interpolate `with:` inputs (#511) 2021-01-30 17:43:11 -08:00
Owen Young 22d56c3517
fix: --version, --help do not need check platform config (#508) 2021-01-29 06:40:13 -08:00
Ed 56ec36726b
Fix Cartesian product to return empty set if empty set is given (#503)
This fixes #499, where a matrix strategy with only include keys ends up
causing multiple builds.  This bugs appears to have been introduced in #415,
when extra include keys are added in the matrix strategy.  The cause
seems to be because the CartesianProduct function returns an item with
empty keys, instead of return an empty set.

Co-authored-by: Ed Tan <edtan@users.noreply.github.com>
2021-01-23 14:55:54 -08:00
KADOTA, Kyohei 2d1a946fb1
Throw an error if the steps has a invalid uses directive (#500)
* Throw an error if the steps has a invalid uses directive

* Refactor TestStepContextExecutor
2021-01-23 08:07:28 -08:00
Cat™ e37b42a333
Print error with workflow/job information when runs-on key is not defined (#494)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-21 06:02:48 -08:00
KADOTA, Kyohei 719a077b7c
Stop current execution if there is the invalid syntax in the workflow (#495) 2021-01-21 06:00:33 -08:00
Cat™ b424a785e3
Load .secrets file as default (#488)
* Load .secrets file as default

* Update README
2021-01-19 06:31:46 -08:00
Cat™ 6130460c40
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
Ed c7b3869b2f
Report error when `if` expression is invalid (#485)
Co-authored-by: Ed Tan <edtan@users.noreply.github.com>
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-18 11:44:27 -08:00
Cat™ 9bbf35e88e
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
Casey Lee 7f6a808262
update stale labels to stop closing issues that are NOT stale 2021-01-18 10:41:49 -08:00
KADOTA, Kyohei e6fcfed458
Format sources with gofmt (#472)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-14 21:37:38 -08:00
Cat™ 41692c314d
Add --env flag to pass environment vars without file (#474) 2021-01-14 21:26:01 -08:00
KADOTA, Kyohei 6e1cdeefc0
Fix "reference not found" error on checkout (#433) (#471) 2021-01-14 21:24:17 -08:00
Cat™ 460ed2db04
Update parts of repo (#476)
* Update flags in README

* Add secrets and `.env` files examples

* Fix typo: environment

* Fix typo: returned

* Add --version back, since I've built act without ldflags
2021-01-14 21:21:44 -08:00
Ibraheam 126cce3cfe
Fix/a small confusion in readme (#477)
* using ubuntu-18.04 instead of ubuntu-latest  when specifying platform -P flag in readme, it cause a little confusion

* fix a confusion in .actrc for the image name
2021-01-14 21:20:17 -08:00
Cat™ 97dc3cf147
Make stale bot action less aggressive (#478)
Make stale bot action less aggressive
Days before marking issues/PRs as stale: 30
Days before closing stale issues/PRs: 14
2021-01-14 21:19:25 -08:00
Wink Saville f2c15074ac
Fix issue 416 (#423)
This is a solution to issue #416 where environment variables created or
changed in the previous step are not usable in the next step because
the rc.ExprEval is from the beginning of the previous step.

This change refactors setupEnv so that before interpolating the environment
variables a NewExpressionEvaluator is created.


Fixes: 416
2021-01-12 16:02:54 -08:00
Cat™ 2811101dea
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 1b38d5c4d9
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™ 760daebf5d
Fix slashes when running on Windows (#461) 2021-01-11 22:41:35 -08:00
Torbjørn Vatn 15eaa15a0e
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 8887daa3e7
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™ 80a245652e
Add option to disable hiding of secrets (#460) 2021-01-11 22:28:45 -08:00
Cat™ a9b3d6426b
Use static initial PATH (#462) 2021-01-11 22:27:16 -08:00
Cat™ fecc571bce
Add Ubuntu 20.04 to supported platforms (#463)
Co-authored-by: Casey Lee <cplee@nektos.com>
2021-01-11 22:22:53 -08:00
Casey Lee f86a4326a8
update goreleaser.yml 2021-01-11 22:17:36 -08:00
Benjamin Cooper e16e6ea1c8
Update README.md (#459) 2021-01-08 00:26:20 -08:00
Steffen Seckler e47a2395a5
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 d784bce96a
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 b3299ecd30
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 8ba3306aa4
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 3f4998a4ed
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 695c496684
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 d5b2d60c35
Add variadic version of hashFiles (#411) 2020-11-09 09:08:57 -08:00
Casey Lee d6b2e9df78
increase operations per run 2020-11-08 08:31:19 -08:00
Casey Lee e6a391ddb1
remove stale label when comments added 2020-11-08 08:23:53 -08:00
Wink Saville 3f3de6e0b1
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 8204ef4b82
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 92067eb1a5
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
Benjamin Räthlein 1e69525fb4
Update README.md (#399)
Add the command structure and another example for a non-default event command to make the usage more clear
2020-10-21 08:09:40 -07:00
jmmendivil 4791a9bc44
doc: add --secret-file example (#395) 2020-10-17 07:38:53 -07:00
lshamis 644bc2b635
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 014d71af43
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 569ebaccae
[Add] More logging for default push action (#383) 2020-10-08 22:28:01 -07:00
Lyle Underwood 3d9b82515c
Remove confusing message about symlinks (#381) 2020-10-06 10:02:37 -07:00
Javier Romero 729adec5e5
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
Tom Payne 32c41d22d6
Fix test target (#375)
* Fix test target

* Run Go tests in test target
2020-09-28 12:03:35 -07:00
Leonardo Dino 44151f208e
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
Tom Payne 6fdf1b04ef
Fix Homebrew install instructions (#374) 2020-09-28 08:21:44 -07:00