Skip to content

Commit

Permalink
ci: update cache action for better perf
Browse files Browse the repository at this point in the history
  • Loading branch information
ForbesLindesay committed Sep 25, 2024
1 parent 7b49f69 commit f2c01e8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows-src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function yarnInstallWithCache(nodeVersion: Expression<string>): Steps {
`Get yarn cache directory path`,
`echo "::set-output name=dir::$(yarn cache dir)"`,
);
use('Enable Cache', 'actions/cache@v2', {
use('Enable Cache', 'actions/cache@v4', {
with: {
path: [
interpolate`${yarnCacheDir}`,
Expand Down Expand Up @@ -63,7 +63,7 @@ export function buildCache(): Steps {
}
})
.sort();
use(`Enable Cache`, 'actions/cache@v2', {
use(`Enable Cache`, 'actions/cache@v4', {
with: {
path: [
...packageNames.map((packageName) => `packages/${packageName}/lib`),
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows-src/website.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default createWorkflow(({setWorkflowName, addTrigger, addJob}) => {

run('yarn build');

use('Enable NextJS Cache', 'actions/cache@v2', {
use('Enable NextJS Cache', 'actions/cache@v4', {
with: {
path: ['packages/website/.next/cache'].join('\n'),
key: interpolate`next-${hashFiles('yarn.lock')}`,
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand All @@ -33,7 +33,7 @@ jobs:
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
packages/bigquery/lib
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand Down Expand Up @@ -285,7 +285,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand All @@ -308,7 +308,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"
id: step_3
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
${{ steps.step_3.outputs.dir }}
Expand All @@ -33,7 +33,7 @@ jobs:
key: ${{ runner.os }}-20.x-${{ hashFiles('yarn.lock') }}-2
- run: yarn install --prefer-offline
- name: Enable Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |-
packages/bigquery/lib
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
restore-keys: v2-build-output-
- run: yarn build
- name: Enable NextJS Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: packages/website/.next/cache
key: next-${{ hashFiles('yarn.lock') }}
Expand Down

0 comments on commit f2c01e8

Please sign in to comment.