try better caching at least
This commit is contained in:
@@ -18,13 +18,25 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # Fetch all history for tags
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v31
|
||||
uses: cachix/install-nix-action@7be5dee1421f63d07e71ce6e0a9f8a4b07c2a487
|
||||
- name: "Cache Nix store"
|
||||
uses: actions/cache@v4
|
||||
id: nix-cache
|
||||
with:
|
||||
path: /tmp/nixcache
|
||||
key: nix-${{ runner.os }}-nix-builder-image-${{ hashFiles('**/package.json', 'package-lock.json', '**/*.nix', '**/flake.lock') }}
|
||||
restore-keys: |
|
||||
nix-${{ runner.os }}-nix-builder-image
|
||||
- name: Setup Attic Cache
|
||||
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
|
||||
with:
|
||||
endpoint: ${{ secrets.ATTIC_ENDPOINT }}
|
||||
cache: ${{ secrets.ATTIC_CACHE }}
|
||||
token: ${{ secrets.ATTIC_TOKEN }}
|
||||
- name: "Import Nix store cache"
|
||||
continue-on-error: true
|
||||
# if: "steps.nix-cache.outputs.cache-hit == 'true'"
|
||||
run: bash scripts/restore_cache.sh
|
||||
- name: Build container
|
||||
run: nix build .#act-runner-image
|
||||
- name: Check Nix flake
|
||||
@@ -55,6 +67,10 @@ jobs:
|
||||
BRANCH: ${{ steps.vars.outputs.BRANCH }}
|
||||
run: |
|
||||
nix develop -c bash scripts/deploy.sh
|
||||
- name: "Export Nix store cache"
|
||||
if: always()
|
||||
# if: "steps.nix-cache.outputs.cache-hit != 'true'"
|
||||
run: bash scripts/populate_cache.sh
|
||||
nix-check:
|
||||
runs-on: nix-runner
|
||||
steps:
|
||||
@@ -67,7 +83,7 @@ jobs:
|
||||
id: nix-cache
|
||||
with:
|
||||
path: /tmp/nixcache
|
||||
key: nix-${{ runner.os }}-nix-builder-image-${{ hashFiles('**/package.json', 'package-lock.json', '**/*.nix', '**/flake.lock', '.npmrc', '.eleventy.js') }}
|
||||
key: nix-${{ runner.os }}-nix-builder-image-${{ hashFiles('**/package.json', 'package-lock.json', '**/*.nix', '**/flake.lock') }}
|
||||
restore-keys: |
|
||||
nix-${{ runner.os }}-nix-builder-image
|
||||
- name: Setup Attic Cache
|
||||
|
||||
Reference in New Issue
Block a user