Retry magic cache
Some checks failed
Lint / lint (push) Successful in 11s
Build Pi NixOS Image / sync (push) Failing after 20s

This commit is contained in:
Gabriel Simmer 2023-08-15 21:30:43 +01:00
parent d3284cc619
commit c04e0a8a9a
Signed by: arch
SSH key fingerprint: SHA256:mXaHIY3tLtudNyb+i3qRd0DeXvpqbst04OgVKVCp2R4

View file

@ -23,29 +23,14 @@ jobs:
- name: Remove access_tokens
run: sed -i '/^access-tokens/d' /etc/nix/nix.conf
- name: Cache Nix store
uses: actions/cache@v3.3.1
id: nix-cache
with:
path: /tmp/nixcache
key: "pi-build-cache"
- name: "Import Nix store cache"
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: "nix-store --import < /tmp/nixcache"
- name: "Build application"
run: "nix build --print-build-logs"
- name: Nix Magic Cache
uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main
- name: Build image
run: nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./pi-imgs/pi-initial.nix --argstr system aarch64-linux
- name: Upload img file
uses: https://github.com/actions/upload-artifact@v3.1.2
- uses: https://github.com/actions/upload-artifact@v3.1.2
with:
name: nixos-pi-23.05-{{ env.GITHUB_SHA }}.img
path: result/sd-image/*.img
- name: "Export Nix store cache"
if: "steps.nix-cache.outputs.cache-hit != 'true'"
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache"