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 {