From 0b2f042faa08a0fd61d7b34c238b4e7ea3dd2b29 Mon Sep 17 00:00:00 2001 From: Julian Mutter Date: Thu, 11 Jun 2026 21:20:38 +0200 Subject: [PATCH] ci: switch upload to registry to not use separate login --- flake.nix | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index 3c3f694..4d36690 100644 --- a/flake.nix +++ b/flake.nix @@ -24,18 +24,22 @@ # 2. Authenticate if CI environment variables are present if [ -n "''${REGISTRY_USERNAME:-}" ] && [ -n "''${REGISTRY_PASSWORD:-}" ]; then echo "CI Environment detected: Logging in to registry." - ${pkgs.skopeo}/bin/skopeo login gitlab.julian-mutter.de \ - --username "''${REGISTRY_USERNAME}" \ - --password "''${REGISTRY_PASSWORD}" + + # 3. Upload to container registry + ${pkgs.skopeo}/bin/skopeo copy \ + --dest-creds "''${REGISTRY_USERNAME}:''${REGISTRY_PASSWORD}" \ + --insecure-policy \ + docker-archive:result \ + docker://gitlab.julian-mutter.de/julian/sheetless-server:latest else echo "Local Environment detected: Skipping login, relying on existing auth." - fi - # 3. Upload to container registry - ${pkgs.skopeo}/bin/skopeo copy \ - --insecure-policy \ - docker-archive:result \ - docker://gitlab.julian-mutter.de/julian/sheetless-server:latest + # 3. Upload to container registry + ${pkgs.skopeo}/bin/skopeo copy \ + --insecure-policy \ + docker-archive:result \ + docker://gitlab.julian-mutter.de/julian/sheetless-server:latest + fi ''; in { devShells.default = pkgs.mkShell {