Skip to content

Commit 945935a

Browse files
authored
Update ghcr-upload.sh (#183)
1 parent 64b7cc2 commit 945935a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

extra/ghcr-upload.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
#! nix-shell -i bash -p zstd -p oras -p jq
33
set -euox pipefail
44

5-
SHELL_NIX_PATH=$(nix path-info "github:${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.sha }}#hydraJobs.${DEV_SHELL}" --accept-flake-config --no-update-lock-file --json | jq -r 'keys[0]')
5+
: "${GITHUB_REPOSITORY_OWNER:?'GITHUB_REPOSITORY_OWNER is not set'}"
6+
: "${GITHUB_REPOSITORY:?'GITHUB_REPOSITORY is not set'}"
7+
: "${GITHUB_SHA:?'GITHUB_SHA is not set'}"
8+
: "${DEV_SHELL:?'DEV_SHELL is not set'}"
9+
10+
SHELL_NIX_PATH=$(nix path-info "github:${GITHUB_REPOSITORY_OWNER}/${GITHUB_REPOSITORY}/${GITHUB_SHA}#hydraJobs.${DEV_SHELL}" --accept-flake-config --no-update-lock-file --json | jq -r 'keys[0]')
611
nix-store -r "$SHELL_NIX_PATH"
712
#nix build ".#hydraJobs.${DEV_SHELL}" --show-trace --accept-flake-config
813
nix-store --export $(nix-store -qR "$SHELL_NIX_PATH") | tee store-paths.txt | zstd -z8T8 >${DEV_SHELL}

0 commit comments

Comments
 (0)