Skip to content

Commit

Permalink
chore: Update actions/cache from v3 to v4
Browse files Browse the repository at this point in the history
This resolves this warning, which was shown on all runs of both
affected workflows:
>The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/cache/save@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/

Example: https://github.com/MetaMask/metamask-extension/actions/runs/10046473531

The only breaking change is that Node.js v20 is now the default
runtime. See https://github.com/actions/cache/releases/tag/v4.0.0
  • Loading branch information
Gudahtt committed Aug 1, 2024
1 parent 82ad9c1 commit af35d6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
- name: Generate Attributions
run: yarn attributions:generate
- name: Cache attributions file
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: attribution.txt
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Restore attributions file
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: attribution.txt
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/update-lavamoat-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Update LavaMoat build policy
run: yarn lavamoat:build:auto
- name: Cache build policy
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: lavamoat/build-system
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand All @@ -109,7 +109,7 @@ jobs:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Restore build policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/build-system
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand All @@ -119,7 +119,7 @@ jobs:
env:
INFURA_PROJECT_ID: 00000000000
- name: Cache ${{ matrix.build-type }} application policy
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: lavamoat/browserify/${{ matrix.build-type }}
key: cache-${{ matrix.build-type }}-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Restore build policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/build-system
key: cache-build-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand All @@ -158,25 +158,25 @@ jobs:
# Ensure this is synchronized with the list above in the "update-lavamoat-webapp-policy" job
# and with the build type list in `builds.yml`
- name: Restore main application policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/browserify/main
key: cache-main-${{ needs.prepare.outputs.COMMIT_SHA }}
fail-on-cache-miss: true
- name: Restore beta application policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/browserify/beta
key: cache-beta-${{ needs.prepare.outputs.COMMIT_SHA }}
fail-on-cache-miss: true
- name: Restore flask application policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/browserify/flask
key: cache-flask-${{ needs.prepare.outputs.COMMIT_SHA }}
fail-on-cache-miss: true
- name: Restore mmi application policy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: lavamoat/browserify/mmi
key: cache-mmi-${{ needs.prepare.outputs.COMMIT_SHA }}
Expand Down

0 comments on commit af35d6f

Please sign in to comment.