From 53399afa73e7ad3f0415a248866dc1bf678e7ce6 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Sat, 4 Feb 2023 19:10:30 -0500 Subject: [PATCH] cache keys by job and inputs --- .github/workflows/bottle.yml | 20 ++++++++++---------- .github/workflows/build.yml | 8 ++++---- .github/workflows/cd.yml | 2 +- .github/workflows/index-data.yml | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/bottle.yml b/.github/workflows/bottle.yml index fac1782b..afc90d00 100644 --- a/.github/workflows/bottle.yml +++ b/.github/workflows/bottle.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/cache@v2 with: path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-get-platform-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - run: scripts/get-platform.ts ${{ inputs.projects }} id: platform @@ -42,15 +42,15 @@ jobs: built: ${{ env.built }} pr: ${{ env.PR }} steps: - - uses: actions/cache@v2 - with: - path: ${{ needs.get-platform.outputs.cache-set }} - key: ${{ runner.os }}-deno-deps - uses: teaxyz/setup@v0 id: tea with: srcroot: tea.xyz/var/pantry prefix: ${{ github.workspace }} + - uses: actions/cache@v2 + with: + path: ${{ needs.get-platform.outputs.cache-set }} + key: ${{ runner.os }}-deno-bottle-${{ hashFiles('.tea/tea.xyz/var/pantry/deno.jsonc')}} - name: configure scripts PATH run: echo "$TEA_PREFIX/tea.xyz/var/pantry/scripts" >> $GITHUB_PATH @@ -167,17 +167,17 @@ jobs: run: working-directory: tea.xyz/var/pantry steps: - - uses: actions/cache@v2 - with: - path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps - - uses: teaxyz/setup@v0 id: tea with: srcroot: tea.xyz/var/pantry prefix: ${{ github.workspace }} + - uses: actions/cache@v2 + with: + path: $HOME/.cache/deno + key: ${{ runner.os }}-deno-bottle-${{ hashFiles('.tea/tea.xyz/var/pantry/deno.jsonc')}} + - uses: actions/download-artifact@v3 with: name: ${{ inputs.platform }}-bottles diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7251fc67..3496119a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/cache@v2 with: path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-get-platform-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - run: scripts/get-platform.ts ${{ inputs.projects }} id: platform @@ -47,7 +47,7 @@ jobs: - uses: actions/cache@v2 with: path: ${{ needs.get-platform.outputs.cache-set }} - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-build-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 id: tea with: @@ -115,7 +115,7 @@ jobs: - uses: actions/cache@v2 with: path: ${{ needs.get-platform.outputs.cache-set }} - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-test-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - name: configure scripts PATH @@ -166,7 +166,7 @@ jobs: - uses: actions/cache@v2 with: path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-stage-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - name: configure scripts PATH diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2852fbd8..317bb851 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/cache@v2 with: path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-cd-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - run: ./scripts/map-projects-to-githubs.ts env: diff --git a/.github/workflows/index-data.yml b/.github/workflows/index-data.yml index 1242404d..5631a1a6 100644 --- a/.github/workflows/index-data.yml +++ b/.github/workflows/index-data.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/cache@v2 with: path: $HOME/.cache/deno - key: ${{ runner.os }}-deno-deps + key: ${{ runner.os }}-deno-queue-detail-ingestion-${{ hashFiles('deno.jsonc')}} - uses: teaxyz/setup@v0 - run: ./scripts/index-packages.ts ${{ inputs.projects }} env: