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
|
# 2. Authenticate if CI environment variables are present
|
||||||
if [ -n "''${REGISTRY_USERNAME:-}" ] && [ -n "''${REGISTRY_PASSWORD:-}" ]; then
|
if [ -n "''${REGISTRY_USERNAME:-}" ] && [ -n "''${REGISTRY_PASSWORD:-}" ]; then
|
||||||
echo "CI Environment detected: Logging in to registry."
|
echo "CI Environment detected: Logging in to registry."
|
||||||
${pkgs.skopeo}/bin/skopeo login gitlab.julian-mutter.de \
|
|
||||||
--username "''${REGISTRY_USERNAME}" \
|
# 3. Upload to container registry
|
||||||
--password "''${REGISTRY_PASSWORD}"
|
${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
|
else
|
||||||
echo "Local Environment detected: Skipping login, relying on existing auth."
|
echo "Local Environment detected: Skipping login, relying on existing auth."
|
||||||
fi
|
|
||||||
|
|
||||||
# 3. Upload to container registry
|
# 3. Upload to container registry
|
||||||
${pkgs.skopeo}/bin/skopeo copy \
|
${pkgs.skopeo}/bin/skopeo copy \
|
||||||
--insecure-policy \
|
--insecure-policy \
|
||||||
docker-archive:result \
|
docker-archive:result \
|
||||||
docker://gitlab.julian-mutter.de/julian/sheetless-server:latest
|
docker://gitlab.julian-mutter.de/julian/sheetless-server:latest
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
|
|||||||
Reference in New Issue
Block a user