mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-07-23 00:34:55 +00:00
Use different cache keys on CI for more reliable builds (#8487)
This commit is contained in:
28
.github/workflows/main.yml
vendored
28
.github/workflows/main.yml
vendored
@ -18,22 +18,14 @@ jobs:
|
||||
check-latest: true
|
||||
cache: npm
|
||||
|
||||
- name: Cache dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-dependencies.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Cache setup
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-setup
|
||||
key: ${{ github.ref }}-${{ github.sha }}-setup
|
||||
|
||||
build:
|
||||
needs: setup
|
||||
@ -43,7 +35,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-setup
|
||||
key: ${{ github.ref }}-${{ github.sha }}-setup
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
@ -59,7 +51,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build
|
||||
|
||||
build-release:
|
||||
needs: setup
|
||||
@ -69,7 +61,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-setup
|
||||
key: ${{ github.ref }}-${{ github.sha }}-setup
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
@ -85,7 +77,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build-release
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build-release
|
||||
|
||||
lint:
|
||||
needs: setup
|
||||
@ -95,7 +87,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-setup
|
||||
key: ${{ github.ref }}-${{ github.sha }}-setup
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
@ -114,7 +106,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build-release
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build-release
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
@ -142,7 +134,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
@ -161,7 +153,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build
|
||||
|
||||
- name: Compress artifacts
|
||||
working-directory: dist
|
||||
@ -187,7 +179,7 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ./*
|
||||
key: ${{ runner.os }}-${{ github.sha }}-build
|
||||
key: ${{ github.ref }}-${{ github.sha }}-build
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
|
Reference in New Issue
Block a user