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:
|
release:
|
||||||
name: Create release
|
name: Create release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
|
||||||
uses: https://github.com/actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '>=1.23.0'
|
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
uses: cachix/install-nix-action@v30
|
||||||
with:
|
with:
|
||||||
# explicitly enable sandbox
|
# explicitly enable sandbox
|
||||||
install_options: --daemon
|
install_options: --daemon
|
||||||
@ -36,15 +33,13 @@ jobs:
|
|||||||
- name: Restore Nix store
|
- name: Restore Nix store
|
||||||
uses: nix-community/cache-nix-action@v5
|
uses: nix-community/cache-nix-action@v5
|
||||||
with:
|
with:
|
||||||
primary-key: nix-small-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
|
primary-key: build-dist-${{ runner.os }}-${{ hashFiles('**/*.nix') }}
|
||||||
restore-prefixes-first-match: nix-small-${{ runner.os }}-
|
restore-prefixes-first-match: build-dist-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Build for release
|
- name: Build for release
|
||||||
id: build-test
|
|
||||||
run: nix build --print-out-paths --print-build-logs .#dist
|
run: nix build --print-out-paths --print-build-logs .#dist
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
id: use-go-action
|
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
|
@ -8,12 +8,14 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Run NixOS test
|
name: Run NixOS test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
uses: cachix/install-nix-action@v30
|
||||||
with:
|
with:
|
||||||
# explicitly enable sandbox
|
# explicitly enable sandbox
|
||||||
install_options: --daemon
|
install_options: --daemon
|
||||||
@ -40,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
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
|
nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.nixos-tests
|
||||||
|
|
||||||
- name: Upload test output
|
- name: Upload test output
|
||||||
@ -53,12 +55,14 @@ jobs:
|
|||||||
dist:
|
dist:
|
||||||
name: Create distribution
|
name: Create distribution
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Nix
|
- name: Install Nix
|
||||||
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
|
uses: cachix/install-nix-action@v30
|
||||||
with:
|
with:
|
||||||
# explicitly enable sandbox
|
# explicitly enable sandbox
|
||||||
install_options: --daemon
|
install_options: --daemon
|
||||||
|
Loading…
Reference in New Issue
Block a user