aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2024-03-03 21:11:34 -0500
committerJoshua M. Boniface <joshua@boniface.me>2024-03-03 21:11:34 -0500
commit351a6a7c73a2a8b65d062495e61017ddbf4c6144 (patch)
tree64d3e5533565b6dee8bc70c4b68adb96302ca529
parentAdd login step (diff)
downloadjellyfin-packaging-351a6a7c73a2a8b65d062495e61017ddbf4c6144.tar.gz
jellyfin-packaging-351a6a7c73a2a8b65d062495e61017ddbf4c6144.tar.bz2
jellyfin-packaging-351a6a7c73a2a8b65d062495e61017ddbf4c6144.zip
Move pushes earlier
-rwxr-xr-xbuild.py26
1 files changed, 15 insertions, 11 deletions
diff --git a/build.py b/build.py
index 1bb144d..35c28ac 100755
--- a/build.py
+++ b/build.py
@@ -344,6 +344,21 @@ def build_docker(jellyfin_version, build_type, _build_arch, _build_version):
log("")
+ # Log in to docker hub
+ os.system("docker login 2>&1")
+
+ # Push the images to DockerHub
+ for image in images:
+ log(f">>> Pushing image {image} to DockerHub")
+ log(f">>>> docker push {image} 2>&1")
+ os.system(f"docker push {image} 2>&1")
+
+ # Push the images to GHCR
+ for image in ghcr_images:
+ log(f">>> Pushing image {image} to GHCR")
+ log(f">>>> docker push {image} 2>&1")
+ os.system(f"docker push {image} 2>&1")
+
# Build the manifests
log(">> Building Docker manifests...")
manifests = list()
@@ -400,24 +415,13 @@ def build_docker(jellyfin_version, build_type, _build_arch, _build_version):
)
manifests.append(f"{configurations['docker']['imagename']}:unstable")
- # Log in to docker hub
- os.system("docker login 2>&1")
-
# Push the images and manifests to DockerHub (we are already logged in from GH Actions)
- for image in images:
- log(f">>> Pushing image {image} to DockerHub")
- log(f">>>> docker push {image} 2>&1")
- os.system(f"docker push {image} 2>&1")
for manifest in manifests:
log(f">>> Pushing manifest {manifest} to DockerHub")
log(f">>>> docker manifest push --purge docker.io/{manifest} 2>&1")
os.system(f"docker manifest push --purge docker.io/{manifest} 2>&1")
# Push the images and manifests to GHCR (we are already logged in from GH Actions)
- for image in images:
- log(f">>> Pushing image {image} to GHCR")
- log(f">>>> docker push ghcr.io/{image} 2>&1")
- os.system(f"docker push ghcr.io/{image} 2>&1")
for manifest in manifests:
log(f">>> Pushing manifest {manifest} to GHCR")
log(f">>>> docker manifest push --purge ghcr.io/{manifest} 2>&1")
bgstack15