From 425b204f4927abf45168aa8ed5563b8d3585d00c Mon Sep 17 00:00:00 2001 From: "James M. Greene" Date: Fri, 14 Apr 2023 15:52:00 -0500 Subject: [PATCH] Use node-version-file parameter instead of an extra step --- .github/workflows/check-dist.yml | 9 +-------- .github/workflows/check-formatting.yml | 9 +-------- .github/workflows/check-linter.yml | 9 +-------- .github/workflows/rebuild-dependabot-prs.yml | 9 +-------- .github/workflows/test.yml | 9 +-------- 5 files changed, 5 insertions(+), 40 deletions(-) diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 76a389e..ad7926f 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -23,17 +23,10 @@ jobs: steps: - uses: actions/checkout@v3 - # check the node version from the .node-version file - - name: fetch node version - id: node-version - run: | - version=$(cat .node-version) - echo "version=${version}" >> $GITHUB_OUTPUT - - name: setup node uses: actions/setup-node@v3 with: - node-version: ${{ steps.node-version.outputs.version }} + node-version-file: '.node-version' cache: npm - name: install dependencies diff --git a/.github/workflows/check-formatting.yml b/.github/workflows/check-formatting.yml index bc06e12..ded00e6 100644 --- a/.github/workflows/check-formatting.yml +++ b/.github/workflows/check-formatting.yml @@ -21,17 +21,10 @@ jobs: - name: Checkout uses: actions/checkout@v3 - # check the node version from the .node-version file - - name: fetch node version - id: node-version - run: | - version=$(cat .node-version) - echo "version=${version}" >> $GITHUB_OUTPUT - - name: setup node uses: actions/setup-node@v3 with: - node-version: ${{ steps.node-version.outputs.version }} + node-version-file: '.node-version' cache: npm - name: install dependencies diff --git a/.github/workflows/check-linter.yml b/.github/workflows/check-linter.yml index 4135b31..90a5b5e 100644 --- a/.github/workflows/check-linter.yml +++ b/.github/workflows/check-linter.yml @@ -21,17 +21,10 @@ jobs: - name: checkout uses: actions/checkout@v3 - # check the node version from the .node-version file - - name: fetch node version - id: node-version - run: | - version=$(cat .node-version) - echo "version=${version}" >> $GITHUB_OUTPUT - - name: setup node uses: actions/setup-node@v3 with: - node-version: ${{ steps.node-version.outputs.version }} + node-version-file: '.node-version' cache: npm - name: install dependencies diff --git a/.github/workflows/rebuild-dependabot-prs.yml b/.github/workflows/rebuild-dependabot-prs.yml index ed413b9..13a27d8 100644 --- a/.github/workflows/rebuild-dependabot-prs.yml +++ b/.github/workflows/rebuild-dependabot-prs.yml @@ -26,17 +26,10 @@ jobs: with: token: ${{ secrets.PAGES_AUTOMATION_PAT }} - # check the node version from the .node-version file - - name: fetch node version - id: node-version - run: | - version=$(cat .node-version) - echo "version=${version}" >> $GITHUB_OUTPUT - - name: setup node uses: actions/setup-node@v3 with: - node-version: ${{ steps.node-version.outputs.version }} + node-version-file: '.node-version' cache: npm - name: install dependencies diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a308de7..04cbad8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,17 +16,10 @@ jobs: - name: checkout uses: actions/checkout@v3 - # check the node version from the .node-version file - - name: fetch node version - id: node-version - run: | - version=$(cat .node-version) - echo "version=${version}" >> $GITHUB_OUTPUT - - name: setup node uses: actions/setup-node@v3 with: - node-version: ${{ steps.node-version.outputs.version }} + node-version-file: '.node-version' cache: npm - name: install dependencies