ci: switch upload to registry to not use separate login
Build and Deploy / deploy (push) Successful in 11s
Build and Deploy / deploy (push) Successful in 11s
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user