diff --git a/.forgejo/workflows/cache.yaml b/.forgejo/workflows/cache.yaml index edd0431..f0f2526 100644 --- a/.forgejo/workflows/cache.yaml +++ b/.forgejo/workflows/cache.yaml @@ -18,7 +18,7 @@ jobs: - name: Push Pim's blog to Nix cache run: /bin/attic push home blog-pim - name: Push Pim's blog to container registry - run: nix --extra-experimental-features "nix-command flakes" run ./checkout#packages.x86_64-linux.release ./checkout#packages.x86_64-linux.blog-pim blog-pim + run: nix --extra-experimental-features "nix-command flakes" run ./checkout#packages.x86_64-linux.release ./checkout#packages.x86_64-linux.blog-pim blog-pim ./checkout - name: Build forgejo-nix-action run: nix build --extra-experimental-features nix-command --extra-experimental-features flakes --no-allow-dirty --out-link forgejo-nix-action ./checkout#packages.x86_64-linux.forgejo-nix-action - name: Push forgjeo-nix-action to Nix cache diff --git a/release.sh b/release.sh index ff42cc4..7d93be7 100755 --- a/release.sh +++ b/release.sh @@ -5,17 +5,18 @@ IFS=$'\n\t' flakeref="${1-}" name="${2-}" +gitdir="${3:-.}" if [ -z "$flakeref" ] || [ -z "$name" ]; then - echo "Usage: $0 FLAKEREF NAME" + echo "Usage: $0 FLAKEREF NAME [GITDIR]" exit 1 fi imagename=$(nix eval --no-allow-dirty --raw $flakeref.imageName) imagetag=$(nix eval --no-allow-dirty --raw $flakeref.imageTag) image=$(nix build --no-allow-dirty $flakeref --print-out-paths --no-link) -gitrev=$(git rev-parse HEAD) +gitrev=$(git --git-dir $gitdir/.git --work-tree $gitdir rev-parse HEAD) docker load < $image docker tag $imagename:$imagetag git.kun.is/home/$name:$gitrev