From 58c6edba4d1b6e5711fe217accfff7c244a2e2a4 Mon Sep 17 00:00:00 2001 From: Phred Date: Thu, 6 Aug 2026 08:45:19 -0500 Subject: [PATCH 1/2] upgraded actions/cache action, deduped yarn version check --- yarn-install/action.yml | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/yarn-install/action.yml b/yarn-install/action.yml index 8646fe6..91631b2 100644 --- a/yarn-install/action.yml +++ b/yarn-install/action.yml @@ -12,12 +12,12 @@ outputs: description: The location of the global yarn cache value: ${{ steps.yarn-cache.outputs.dir }} runs: - using: 'composite' + using: composite steps: # Cache every node_modules folder inside the monorepo - name: cache all node_modules id: cache-modules - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0 with: path: '**/node_modules' # We use both yarn.lock and package.json as cache keys to ensure that @@ -30,11 +30,23 @@ runs: - name: find location of global yarn cache id: yarn-cache if: steps.cache-modules.outputs.cache-hit != 'true' - run: echo "dir=$([[ "$(yarn --version)" =~ "1.*" ]] && yarn cache dir || yarn config get cacheFolder)" >> $GITHUB_OUTPUT + run: | + if [[ "$(yarn --version)" =~ "1.*" ]]; then + dir="$(yarn cache dir)" + flag='--fronzen-lockfile' + else + dir="$(yarn config get cacheFolder)" + flag='--frozen-lockfile' + fi + + { + echo dir="$dir" + echo install-flag="$flag" + } >> "$GITHUB_OUTPUT" shell: bash - name: cache global yarn cache - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0 if: steps.cache-modules.outputs.cache-hit != 'true' with: path: ${{ steps.yarn-cache.outputs.dir }} @@ -43,6 +55,8 @@ runs: ${{ inputs.cache-prefix }}-yarn- - name: yarn install + env: + YARN_INSTALL_FLAG: ${{ steps.yarn-cache.outputs.install-flag }} if: steps.cache-modules.outputs.cache-hit != 'true' - run: '[[ "$(yarn --version)" =~ "1.*" ]] && yarn install --frozen-lockfile || yarn install --immutable' + run: yarn install "$YARN_INSTALL_FLAG" shell: bash From b9a3fda0cea2ebb5e08da825b10c358b397238e1 Mon Sep 17 00:00:00 2001 From: Phred Date: Thu, 6 Aug 2026 08:58:51 -0500 Subject: [PATCH 2/2] fixed typo --- yarn-install/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-install/action.yml b/yarn-install/action.yml index 91631b2..14cb58b 100644 --- a/yarn-install/action.yml +++ b/yarn-install/action.yml @@ -17,7 +17,7 @@ runs: # Cache every node_modules folder inside the monorepo - name: cache all node_modules id: cache-modules - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: '**/node_modules' # We use both yarn.lock and package.json as cache keys to ensure that @@ -46,7 +46,7 @@ runs: shell: bash - name: cache global yarn cache - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # 6.1.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 if: steps.cache-modules.outputs.cache-hit != 'true' with: path: ${{ steps.yarn-cache.outputs.dir }}