fix: missing defaults in nodejs pre (#1349)
* Update action.go * add Test Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
d137ec8285
commit
6037182487
3 changed files with 26 additions and 0 deletions
|
@ -481,6 +481,8 @@ func runPreStep(step actionStep) common.Executor {
|
||||||
|
|
||||||
switch action.Runs.Using {
|
switch action.Runs.Using {
|
||||||
case model.ActionRunsUsingNode12, model.ActionRunsUsingNode16:
|
case model.ActionRunsUsingNode12, model.ActionRunsUsingNode16:
|
||||||
|
// defaults in pre steps were missing, however provided inputs are available
|
||||||
|
populateEnvsFromInput(ctx, step.getEnv(), action, rc)
|
||||||
// todo: refactor into step
|
// todo: refactor into step
|
||||||
var actionDir string
|
var actionDir string
|
||||||
var actionPath string
|
var actionPath string
|
||||||
|
|
|
@ -137,6 +137,7 @@ func TestRunEvent(t *testing.T) {
|
||||||
{workdir, "uses-composite", "push", "", platforms},
|
{workdir, "uses-composite", "push", "", platforms},
|
||||||
{workdir, "uses-composite-with-error", "push", "Job 'failing-composite-action' failed", platforms},
|
{workdir, "uses-composite-with-error", "push", "Job 'failing-composite-action' failed", platforms},
|
||||||
{workdir, "uses-nested-composite", "push", "", platforms},
|
{workdir, "uses-nested-composite", "push", "", platforms},
|
||||||
|
{workdir, "remote-action-composite-js-pre-with-defaults", "push", "", platforms},
|
||||||
{workdir, "uses-workflow", "push", "reusable workflows are currently not supported (see https://github.com/nektos/act/issues/826 for updates)", platforms},
|
{workdir, "uses-workflow", "push", "reusable workflows are currently not supported (see https://github.com/nektos/act/issues/826 for updates)", platforms},
|
||||||
{workdir, "uses-docker-url", "push", "", platforms},
|
{workdir, "uses-docker-url", "push", "", platforms},
|
||||||
{workdir, "act-composite-env-test", "push", "", platforms},
|
{workdir, "act-composite-env-test", "push", "", platforms},
|
||||||
|
|
23
pkg/runner/testdata/remote-action-composite-js-pre-with-defaults/push.yml
vendored
Normal file
23
pkg/runner/testdata/remote-action-composite-js-pre-with-defaults/push.yml
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
name: remote-action-composite-js-pre-with-defaults
|
||||||
|
on: push
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: nektos/act-test-actions/composite-js-pre-with-defaults/js@main
|
||||||
|
with:
|
||||||
|
in: nix
|
||||||
|
- uses: nektos/act-test-actions/composite-js-pre-with-defaults@main
|
||||||
|
with:
|
||||||
|
in: secretval
|
||||||
|
- uses: nektos/act-test-actions/composite-js-pre-with-defaults@main
|
||||||
|
with:
|
||||||
|
in: secretval
|
||||||
|
- uses: nektos/act-test-actions/composite-js-pre-with-defaults/js@main
|
||||||
|
with:
|
||||||
|
pre: "true"
|
||||||
|
in: nix
|
||||||
|
- uses: nektos/act-test-actions/composite-js-pre-with-defaults/js@main
|
||||||
|
with:
|
||||||
|
in: nix
|
Loading…
Add table
Reference in a new issue