aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitea
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-02-01 21:05:18 +0900
committerOphestra <cat@gensokyo.uk>2025-02-01 21:16:13 +0900
commitd58fb8c6eee659e4a71c4d69bfb8539199b431bd (patch)
treef57510f9da08c1e5cc88aec2c1c3f2af673fccbf /.gitea
parent5808fe61c3618be883240d2bd2dc3669b6bf4497 (diff)
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>
Diffstat (limited to '.gitea')
-rw-r--r--.gitea/workflows/release.yml17
-rw-r--r--.gitea/workflows/test.yml14
2 files changed, 15 insertions, 16 deletions
diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml
index 40827d2d..e032e64c 100644
--- a/.gitea/workflows/release.yml
+++ b/.gitea/workflows/release.yml
@@ -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: |-
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index aabca0f4..cf35a217 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -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