tangled
alpha
login
or
join now
tangled.org
/
knot-docker
90
fork
atom
Community maintained Docker config for the knot server
90
fork
atom
overview
issues
3
pulls
1
pipelines
debuggery
knotbin.com
6 months ago
162b8cf9
c04c6888
+24
-5
1 changed file
expand all
collapse all
unified
split
.tangled
workflows
publish.yml
+24
-5
.tangled/workflows/publish.yml
···
140
140
EOF
141
141
cp ~/.config/containers/policy.json /etc/containers/policy.json 2>/dev/null || true
142
142
143
143
+
# Debug: Check credentials are set
144
144
+
echo "Debug: DOCKER_USERNAME is set: $([ -n "$DOCKER_USERNAME" ] && echo "YES" || echo "NO")"
145
145
+
echo "Debug: DOCKER_PASSWORD is set: $([ -n "$DOCKER_PASSWORD" ] && echo "YES" || echo "NO")"
146
146
+
echo "Debug: DOCKER_USERNAME value: $DOCKER_USERNAME"
147
147
+
echo "Debug: Password length: ${#DOCKER_PASSWORD}"
148
148
+
143
149
# Export buildah image to docker format
150
150
+
echo "Exporting $TAG image..."
144
151
buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:$TAG docker-archive:image-$TAG.tar
152
152
+
echo "Exporting latest image..."
145
153
buildah push localhost/$DOCKER_USERNAME/$DOCKER_REPO:latest docker-archive:image-latest.tar
146
154
155
155
+
# Check if archives were created
156
156
+
echo "Debug: Checking created archives..."
157
157
+
ls -la image-*.tar
158
158
+
echo "Debug: Archive sizes:"
159
159
+
du -h image-*.tar
160
160
+
147
161
# Use skopeo to push to Docker Hub with proper login
148
162
echo "Logging in to Docker Hub..."
149
163
echo "$DOCKER_PASSWORD" | skopeo login docker.io -u "$DOCKER_USERNAME" --password-stdin
150
164
165
165
+
# Verify login worked
166
166
+
skopeo login docker.io -u "$DOCKER_USERNAME" --get-login || echo "Login verification failed"
167
167
+
151
168
echo "Pushing image: $DOCKER_USERNAME/$DOCKER_REPO:$TAG"
152
169
153
153
-
# Push the tagged image
154
154
-
skopeo copy \
170
170
+
# Push the tagged image with verbose output
171
171
+
echo "Debug: Pushing $TAG version..."
172
172
+
skopeo copy --debug \
155
173
docker-archive:image-$TAG.tar \
156
174
docker://docker.io/$DOCKER_USERNAME/$DOCKER_REPO:$TAG
157
175
158
158
-
# Push as latest
159
159
-
skopeo copy \
176
176
+
# Push as latest with verbose output
177
177
+
echo "Debug: Pushing latest version..."
178
178
+
skopeo copy --debug \
160
179
docker-archive:image-latest.tar \
161
180
docker://docker.io/$DOCKER_USERNAME/$DOCKER_REPO:latest
162
181
163
163
-
echo "Successfully pushed both $TAG and latest tags"
182
182
+
echo "Push operations completed - check debug output above for any errors"
164
183
165
184
environment:
166
185
GIT_COMMIT: "${CI_COMMIT_SHA}"