Skip to content

Commit

Permalink
chore(CI): update to actions/cache@v3 (#17201)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored and bartlomieju committed Jan 5, 2023
1 parent 63ca68d commit a162f5e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ jobs:

# In main branch, always creates fresh cache
- name: Cache build output (main)
# TODO(kt3k): Change the version to the released version
# when https://github.com/actions/cache/pull/489 (or 571) is merged.
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
uses: actions/cache/save@v3
if: (matrix.profile == 'release' || matrix.profile == 'fastci') &&
github.ref == 'refs/heads/main'
with:
Expand All @@ -253,9 +251,7 @@ jobs:
# Restore cache from the latest 'main' branch build.
- name: Cache build output (PR)
# TODO(kt3k): Change the version to the released version
# when https://github.com/actions/cache/pull/489 (or 571) is merged.
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
uses: actions/cache/restore@v3
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')
with:
path: |
Expand All @@ -267,12 +263,6 @@ jobs:
restore-keys: |
18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-
# Don't save cache after building PRs or branches other than 'main'.
- name: Skip save cache (PR)
run: echo "CACHE_SKIP_SAVE=true" >> $GITHUB_ENV
shell: bash
if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/')

- name: Apply and update mtime cache
if: matrix.profile == 'release'
uses: ./.github/mtime_cache
Expand Down

0 comments on commit a162f5e

Please sign in to comment.