From 5fc98a082c30ef7385519cdf1a8a9f11fc01006f Mon Sep 17 00:00:00 2001 From: Luca Cherubin Date: Thu, 19 Dec 2024 18:48:48 +0100 Subject: [PATCH 1/3] chore: update setup-yarn-cache using is-cache-enabled --- setup-yarn-cache/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setup-yarn-cache/action.yml b/setup-yarn-cache/action.yml index 87acabe9..7cb58b86 100644 --- a/setup-yarn-cache/action.yml +++ b/setup-yarn-cache/action.yml @@ -38,6 +38,11 @@ runs: echo "result=false" >> $GITHUB_OUTPUT fi + # Check if PR contains a label to disable the cache + - name: Check if cache is enabled + uses: camunda/infra-global-github-action/is-cache-enabled@6f325f913625cc0025659822abaf8168f867e432 + id: is-cache-enabled + - name: Get Yarn global cache directory shell: bash working-directory: ${{ inputs.directory }} @@ -68,8 +73,8 @@ runs: ${{ runner.environment }}-${{ runner.os }}-yarn - name: Restore global Yarn cache always - # Restore cache (but don't save it) if we're not on main or stable/* branches - if: ${{ steps.is-cache-create-branch.outputs.result != 'true' }} + # Restore cache (but don't save it) if we're not on main or stable/* branches and cache is not disabled + if: ${{ steps.is-cache-create-branch.outputs.result != 'true' && steps.is-cache-enabled.outputs.is-cache-enabled == 'true' }} uses: actions/cache/restore@v4 with: path: "${{ env.CUSTOM_YARN_GLOBAL_CACHE_DIR }}" From 7354c06fc7829b5843712046fd62893bcc3c04a1 Mon Sep 17 00:00:00 2001 From: Luca Cherubin Date: Thu, 19 Dec 2024 18:52:40 +0100 Subject: [PATCH 2/3] chore: fix typo --- setup-yarn-cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-yarn-cache/action.yml b/setup-yarn-cache/action.yml index 7cb58b86..db58c72e 100644 --- a/setup-yarn-cache/action.yml +++ b/setup-yarn-cache/action.yml @@ -40,7 +40,7 @@ runs: # Check if PR contains a label to disable the cache - name: Check if cache is enabled - uses: camunda/infra-global-github-action/is-cache-enabled@6f325f913625cc0025659822abaf8168f867e432 + uses: camunda/infra-global-github-actions/is-cache-enabled@6f325f913625cc0025659822abaf8168f867e432 id: is-cache-enabled - name: Get Yarn global cache directory From a6b3758b2f033a5227a4f4406ab16783c2656323 Mon Sep 17 00:00:00 2001 From: Luca Cherubin Date: Fri, 20 Dec 2024 11:18:21 +0100 Subject: [PATCH 3/3] chore: use is-cache-enabled composite action from main branch --- setup-yarn-cache/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup-yarn-cache/action.yml b/setup-yarn-cache/action.yml index db58c72e..700c4a5a 100644 --- a/setup-yarn-cache/action.yml +++ b/setup-yarn-cache/action.yml @@ -40,7 +40,7 @@ runs: # Check if PR contains a label to disable the cache - name: Check if cache is enabled - uses: camunda/infra-global-github-actions/is-cache-enabled@6f325f913625cc0025659822abaf8168f867e432 + uses: camunda/infra-global-github-actions/is-cache-enabled@main id: is-cache-enabled - name: Get Yarn global cache directory