Files
electron/.github/actions/install-dependencies/action.yml
2025-11-22 23:29:11 -08:00

26 lines
951 B
YAML

name: 'Install Dependencies'
description: 'Installs yarn depdencies using cache when available'
runs:
using: "composite"
steps:
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "dir=$(node src/electron/script/yarn.js config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('src/electron/yarn.lock') }} TODO: Restore after https://github.com/actions/runner/issues/449 is fixed
key: ${{ runner.os }}-yarn-${{ github.sha }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
shell: bash
run: |
cd src/electron
if [ "$TARGET_ARCH" = "x86" ]; then
export npm_config_arch="ia32"
fi
node script/yarn.js install --immutable-cache