workflows: fix nix store cache
Prefix does not seem to match correctly, this appears to be a Gitea implementation bug. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
5808fe61c3
commit
d58fb8c6ee
@ -9,17 +9,14 @@ jobs:
|
||||
release:
|
||||
name: Create release
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Setup go
|
||||
uses: https://github.com/actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.23.0'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
||||
uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
install_options: --daemon
|
||||
@ -36,15 +33,13 @@ jobs:
|
||||
- name: Restore Nix store
|
||||
uses: nix-community/cache-nix-action@v5
|
||||
with:
|
||||
primary-key: nix-small-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
|
||||
restore-prefixes-first-match: nix-small-${{ runner.os }}-
|
||||
primary-key: build-dist-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
|
||||
restore-prefixes-first-match: build-dist-${{ runner.os }}-
|
||||
|
||||
- name: Build for release
|
||||
id: build-test
|
||||
run: nix build --print-out-paths --print-build-logs .#dist
|
||||
|
||||
- name: Release
|
||||
id: use-go-action
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |-
|
||||
|
@ -8,12 +8,14 @@ jobs:
|
||||
test:
|
||||
name: Run NixOS test
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
||||
uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
install_options: --daemon
|
||||
@ -40,7 +42,7 @@ jobs:
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
nix --print-build-logs --experimental-features 'nix-command flakes' flake check --all-systems
|
||||
nix --print-build-logs --experimental-features 'nix-command flakes' flake check
|
||||
nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.nixos-tests
|
||||
|
||||
- name: Upload test output
|
||||
@ -53,12 +55,14 @@ jobs:
|
||||
dist:
|
||||
name: Create distribution
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
||||
uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
# explicitly enable sandbox
|
||||
install_options: --daemon
|
||||
|
Loading…
Reference in New Issue
Block a user