actions: cache: use separate jobs for restore and save
This commit is contained in:
parent
72b1e754a5
commit
e63a861f43
1 changed files with 7 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
save-cache:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: code.forgejo.org/oci/node:20-bookworm
|
||||
|
|
@ -29,9 +29,12 @@ jobs:
|
|||
/usr/local/bin/something
|
||||
key: ${{ steps.cachestep1.outputs.cache-primary-key }}
|
||||
|
||||
- name: remove something
|
||||
run: rm /usr/local/bin/something
|
||||
|
||||
restore-cache:
|
||||
runs-on: docker
|
||||
needs: [save-cache]
|
||||
container:
|
||||
image: code.forgejo.org/oci/node:20-bookworm
|
||||
steps:
|
||||
- name: cache restore
|
||||
id: cachestep2
|
||||
uses: https://data.forgejo.org/actions/cache/restore@v4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue