try better caching at least
Some checks failed
Build and Deploy / build-deploy-ubuntu (push) Has been cancelled
Build and Deploy / nix-check (push) Has been cancelled

This commit is contained in:
2025-09-17 18:19:29 -05:00
parent f0360c3bf9
commit 21b3f6dbae

View File

@@ -18,13 +18,25 @@ jobs:
with: with:
fetch-depth: 0 # Fetch all history for tags fetch-depth: 0 # Fetch all history for tags
- name: Install Nix - 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 - name: Setup Attic Cache
uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866 uses: ryanccn/attic-action@3354ae812cb672e1381be4c7914204c44db53866
with: with:
endpoint: ${{ secrets.ATTIC_ENDPOINT }} endpoint: ${{ secrets.ATTIC_ENDPOINT }}
cache: ${{ secrets.ATTIC_CACHE }} cache: ${{ secrets.ATTIC_CACHE }}
token: ${{ secrets.ATTIC_TOKEN }} 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 - name: Build container
run: nix build .#act-runner-image run: nix build .#act-runner-image
- name: Check Nix flake - name: Check Nix flake
@@ -55,6 +67,10 @@ jobs:
BRANCH: ${{ steps.vars.outputs.BRANCH }} BRANCH: ${{ steps.vars.outputs.BRANCH }}
run: | run: |
nix develop -c bash scripts/deploy.sh 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: nix-check:
runs-on: nix-runner runs-on: nix-runner
steps: steps:
@@ -67,7 +83,7 @@ jobs:
id: nix-cache id: nix-cache
with: with:
path: /tmp/nixcache 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: | restore-keys: |
nix-${{ runner.os }}-nix-builder-image nix-${{ runner.os }}-nix-builder-image
- name: Setup Attic Cache - name: Setup Attic Cache