FIX(ci): add error handling and debug logging
Some checks failed
Build and Push to Zot / build-and-push (push) Has been cancelled
Some checks failed
Build and Push to Zot / build-and-push (push) Has been cancelled
- Add -e flag to exit on error - Add -x flag to trace commands - Add ls command to verify image.tar exists
This commit is contained in:
@@ -44,10 +44,11 @@ jobs:
|
||||
containers:
|
||||
- name: crane
|
||||
image: gcr.io/go-containerregistry/crane:debug
|
||||
command: ["/busybox/sh", "-c"]
|
||||
command: ["/busybox/sh", "-exc"]
|
||||
args:
|
||||
- |
|
||||
echo "Pushing image to ${REGISTRY}/${IMAGE_NAME}..."
|
||||
ls -la /workspace/
|
||||
crane auth login ${REGISTRY} -u \$(cat /secrets/username) -p \$(cat /secrets/password)
|
||||
crane push /workspace/image.tar ${REGISTRY}/${IMAGE_NAME}:latest
|
||||
crane push /workspace/image.tar ${REGISTRY}/${IMAGE_NAME}:${GITHUB_SHA}
|
||||
|
||||
Reference in New Issue
Block a user