Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camunda 24303 use composite action to check caching #320

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions setup-yarn-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-actions/is-cache-enabled@6f325f913625cc0025659822abaf8168f867e432
id: is-cache-enabled

- name: Get Yarn global cache directory
shell: bash
working-directory: ${{ inputs.directory }}
Expand Down Expand Up @@ -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 }}"
Expand Down
Loading