Skip to content

Commit bd0f439

Browse files
committed
feat: add push-ci2 script for nocache variant cachix push
1 parent f9fd803 commit bd0f439

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ jobs:
9999
nix build --show-trace --file . scratchImage.push --out-link nix-scratches
100100
./nix-scratches/bin/push
101101
- name: Push nocache variant store paths
102-
run: |
103-
DRV=$(nix-store -qd $(nix build --no-link --print-out-paths --file . kubenixCI2.deploymentScript 2>/dev/null) 2>/dev/null)
104-
nix-store -qR --include-outputs "$DRV" 2>/dev/null | grep -v '\.drv$' |
105-
nix shell --file . pkgs.cachix --command cachix push nix-csi || true
102+
run: nix run --file . push-ci2 2>/dev/null || true
106103
test-kind-cache:
107104
needs: build-manifests
108105
runs-on: ubuntu-latest

default.nix

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,19 @@ rec {
152152
nix-store -qR --include-outputs $(nix-store -qd ${kubenixPush.deploymentScript}) | grep -v '\.drv$' | cachix push nix-csi
153153
'';
154154

155+
# Push kubenixCI2 (nocache variant) store paths to cachix.
156+
# Run separately since CI2 is x86_64-only (cannot be in the main push script
157+
# which also runs on ARM runners).
158+
push-ci2 =
159+
pkgs.writeScriptBin "push-ci2" # bash
160+
''
161+
#! ${pkgs.runtimeShell}
162+
export PATH=${lib.makeBinPath [ pkgs.cachix ]}:$PATH
163+
set -euo pipefail
164+
DRV=$(nix-store -qd $(nix build --no-link --print-out-paths --file ${builtins.toString ./.} kubenixCI2.deploymentScript 2>/dev/null))
165+
nix-store -qR --include-outputs "$DRV" 2>/dev/null | grep -v '\.drv$' | cachix push nix-csi
166+
'';
167+
155168
# Push environments for both x86_64-linux and aarch64-linux to cachix.
156169
# Requires builders that support both architectures (e.g. nixbuild.net or ssh builders).
157170
push-env =

0 commit comments

Comments
 (0)