From 726278d12a4776c7a15533c01c49ad44cea4aace Mon Sep 17 00:00:00 2001 From: npcopter <107427979+npcopter@users.noreply.github.com> Date: Fri, 8 Mar 2024 15:41:29 +0700 Subject: [PATCH] Add dynamic node version on build workflow (#5) * feat: add dynamic node version on buidl workflow * test: add test for build with node version * test: add test only on pr * test: remove trigger on merge to main * test: fix source workflow * test: test without node version * test: change version to branch instead * test: add test for node version * test: remove pull request action --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 05e5606..d25d893 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,9 @@ on: concurrency-group: required: false type: string + node-version: + required: false + type: string concurrency: group: ${{ inputs.concurrency-group || github.head_ref }} @@ -22,6 +25,9 @@ jobs: run: shell: bash steps: + - uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node-version || '16'}} - uses: vtno/seaeye/.github/actions/yarn-install@v0.1.0 with: working-dir: ${{ inputs.working-dir }} @@ -34,6 +40,9 @@ jobs: run: shell: bash steps: + - uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node-version || '16'}} - uses: vtno/seaeye/.github/actions/yarn-build@v0.1.0 with: working-dir: ${{ inputs.working-dir }} @@ -46,6 +55,9 @@ jobs: run: shell: bash steps: + - uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node-version || '16'}} - uses: vtno/seaeye/.github/actions/yarn-test@v0.1.0 with: working-dir: ${{ inputs.working-dir }} @@ -58,6 +70,9 @@ jobs: run: shell: bash steps: + - uses: actions/setup-node@v2 + with: + node-version: ${{ inputs.node-version || '16'}} - uses: vtno/seaeye/.github/actions/yarn-lint@v0.1.0 with: working-dir: ${{ inputs.working-dir }}