mirror of
https://github.com/selfxyz/self.git
synced 2026-01-07 22:04:03 -05:00
* fix addhaar typo * consolidate mobile app links and add tests * fix caching issues for pipelines * fix gitleaks * update binary merkle root.circom package source * fix cache * update path * rename lockfile * fix qrcode error * fix mobile ci tests and prettier * fix qr code typing * fix qrcode pipelines * fix integration test
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Cache Yarn
|
|
|
|
description: Cache Yarn dependencies with consistent keys and paths.
|
|
|
|
inputs:
|
|
path:
|
|
description: Paths to cache
|
|
required: false
|
|
default: |
|
|
.yarn/cache
|
|
lock-file:
|
|
description: Path to yarn.lock
|
|
required: false
|
|
default: yarn.lock
|
|
cache-version:
|
|
description: Additional cache version segment
|
|
required: false
|
|
default: v1
|
|
|
|
outputs:
|
|
cache-hit:
|
|
description: Whether an exact match was found for the cache key
|
|
value: ${{ steps.cache.outputs.cache-hit }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- id: get-hash
|
|
name: Hash lock file
|
|
shell: bash
|
|
run: |
|
|
if [ -f "${{ inputs.lock-file }}" ]; then
|
|
echo "hash=$(shasum -a 256 "${{ inputs.lock-file }}" | awk '{ print $1 }')" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "::warning::Lock file '${{ inputs.lock-file }}' not found."
|
|
echo "hash=no-lock-file" >> $GITHUB_OUTPUT
|
|
fi
|
|
- id: cache
|
|
name: Cache Yarn dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ inputs.path }}
|
|
key: ${{ runner.os }}-yarn-${{ inputs.cache-version }}-${{ steps.get-hash.outputs.hash }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-${{ inputs.cache-version }}-
|
|
${{ runner.os }}-yarn-
|