diff options
Diffstat (limited to 'pkg/runner/testdata/act-composite-env-test')
3 files changed, 55 insertions, 0 deletions
diff --git a/pkg/runner/testdata/act-composite-env-test/action1/action.yml b/pkg/runner/testdata/act-composite-env-test/action1/action.yml new file mode 100644 index 0000000..e027ac6 --- /dev/null +++ b/pkg/runner/testdata/act-composite-env-test/action1/action.yml @@ -0,0 +1,21 @@ +name: action1 +description: action1 +runs: + using: composite + steps: + - name: env.COMPOSITE_OVERRIDE != '1' + run: exit 1 + if: env.COMPOSITE_OVERRIDE != '1' + shell: bash + - name: env.JOB != '1' + run: exit 1 + if: env.JOB != '1' + shell: bash + - name: env.GLOBAL != '1' + run: exit 1 + if: env.GLOBAL != '1' + shell: bash + - uses: ./act-composite-env-test/action2 + env: + COMPOSITE_OVERRIDE: "2" + COMPOSITE: "1" diff --git a/pkg/runner/testdata/act-composite-env-test/action2/action.yml b/pkg/runner/testdata/act-composite-env-test/action2/action.yml new file mode 100644 index 0000000..8716838 --- /dev/null +++ b/pkg/runner/testdata/act-composite-env-test/action2/action.yml @@ -0,0 +1,21 @@ +name: action2 +description: actions2 +runs: + using: composite + steps: + - name: env.COMPOSITE_OVERRIDE != '2' + run: exit 1 + if: env.COMPOSITE_OVERRIDE != '2' + shell: bash + - name: env.COMPOSITE != '1' + run: exit 1 + if: env.COMPOSITE != '1' + shell: bash + - name: env.JOB != '1' + run: exit 1 + if: env.JOB != '1' + shell: bash + - name: env.GLOBAL != '1' + run: exit 1 + if: env.GLOBAL != '1' + shell: bash diff --git a/pkg/runner/testdata/act-composite-env-test/push.yml b/pkg/runner/testdata/act-composite-env-test/push.yml new file mode 100644 index 0000000..da7109e --- /dev/null +++ b/pkg/runner/testdata/act-composite-env-test/push.yml @@ -0,0 +1,13 @@ +on: push +env: + GLOBAL: "1" +jobs: + test: + runs-on: ubuntu-latest + env: + JOB: "1" + steps: + - uses: actions/checkout@v2 + - uses: ./act-composite-env-test/action1 + env: + COMPOSITE_OVERRIDE: "1" |