mirror of
https://github.com/ivabus/pantry
synced 2024-11-26 18:25:08 +03:00
better cache paths
ref https://github.com/actions/cache/blob/main/examples.md#deno
This commit is contained in:
parent
f2710b933b
commit
55ec7e2d30
5 changed files with 21 additions and 11 deletions
8
.github/workflows/bottle.yml
vendored
8
.github/workflows/bottle.yml
vendored
|
@ -27,7 +27,9 @@ jobs:
|
|||
repository: teaxyz/pantry.core
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-get-platform-${{ hashFiles('deno.jsonc')}}
|
||||
- uses: teaxyz/setup@v0
|
||||
- run: scripts/get-platform.ts
|
||||
|
@ -147,7 +149,9 @@ jobs:
|
|||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-bottle-${{ hashFiles('tea.xyz/var/pantry/deno.jsonc')}}
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
|
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -29,7 +29,9 @@ jobs:
|
|||
repository: teaxyz/pantry.core
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-get-platform-${{ hashFiles('deno.jsonc')}}
|
||||
- uses: teaxyz/setup@v0
|
||||
- run: scripts/get-platform.ts ${{ inputs.projects }}
|
||||
|
@ -160,7 +162,9 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-stage-${{ hashFiles('deno.jsonc')}}
|
||||
- uses: teaxyz/setup@v0
|
||||
|
||||
|
|
4
.github/workflows/cd.yml
vendored
4
.github/workflows/cd.yml
vendored
|
@ -13,7 +13,9 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-cd-${{ hashFiles('deno.jsonc')}}
|
||||
- uses: teaxyz/setup@v0
|
||||
- run: scripts/map-projects-to-githubs.ts
|
||||
|
|
4
.github/workflows/index-data.yml
vendored
4
.github/workflows/index-data.yml
vendored
|
@ -14,7 +14,9 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: $HOME/.cache/deno
|
||||
path: |
|
||||
~/.deno
|
||||
~/.cache/deno
|
||||
key: ${{ runner.os }}-deno-queue-detail-ingestion-${{ hashFiles('deno.jsonc')}}
|
||||
- uses: teaxyz/setup@v0
|
||||
- run: ./scripts/index-packages.ts ${{ inputs.projects }}
|
||||
|
|
|
@ -32,11 +32,9 @@ type OS = string | string[]
|
|||
const platform = Deno.env.get("PLATFORM") ?? panic("$PLATFORM not set")
|
||||
|
||||
|
||||
const home = Deno.env.get("HOME")
|
||||
|
||||
const cacheSets = {
|
||||
"darwin": `${home}/Library/Caches/deno/deps/https/`,
|
||||
"linux": `${home}/.cache/deno/deps/https/`
|
||||
"darwin": `~/.deno\n~/Library/Caches/deno/deps/https/`,
|
||||
"linux": `~/.deno\n~/.cache/deno/deps/https/`
|
||||
}
|
||||
|
||||
const output: Output = (() => {
|
||||
|
@ -95,7 +93,7 @@ const rv = `os=${JSON.stringify(output.os)}\n` +
|
|||
`build-os=${JSON.stringify(output.buildOs)}\n` +
|
||||
`container=${JSON.stringify(output.container)}\n` +
|
||||
`test-matrix=${JSON.stringify(output.testMatrix)}\n` +
|
||||
`cache-set=${JSON.stringify(output.cacheSet)}\n`
|
||||
`cache-set<<EOF\n${output.cacheSet}\nEOF\n`
|
||||
|
||||
Deno.stdout.write(new TextEncoder().encode(rv))
|
||||
|
||||
|
|
Loading…
Reference in a new issue