From c9a27d70272c5e971dfa7a2e9447a41b3b6c8028 Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Fri, 1 Mar 2024 16:40:07 +0100 Subject: [PATCH] build(gha): replace vars reference in composite action --- .github/actions/build/action.yml | 7 ++++++- .github/workflows/pull-request.yml | 2 ++ .github/workflows/push.yml | 2 ++ .github/workflows/test.yml | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 2bd98347..d6331f2c 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,12 +1,17 @@ name: 'Create build' description: 'Sets up environment and creates a build' +inputs: + node-version: + description: 'Node version to use' + required: true + runs: using: composite steps: - uses: myparcelnl/actions/yarn-install@v4 with: - node-version: ${{ vars.NODE_VERSION }} + node-version: ${{ inputs.node-version }} - name: 'Build packages' shell: bash diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3046711d..9f5e0434 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -24,6 +24,8 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/build + with: + node-version: ${{ vars.NODE_VERSION }} - uses: myparcelnl/actions/setup-git-credentials@v4 id: credentials diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 06477007..6975e9a7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -35,6 +35,8 @@ jobs: token: ${{ secrets.GH_REPO_TOKEN }} - uses: ./.github/actions/build + with: + node-version: ${{ vars.NODE_VERSION }} - uses: actions/upload-pages-artifact@v3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bae07a05..fcfd2fad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,8 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/build + with: + node-version: ${{ vars.NODE_VERSION }} - name: 'Run tests' shell: bash