File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 3232
3333 - name : Image digest
3434 run : echo ${{ steps.docker_build.outputs.digest }}
35+
36+ - name : Verify pushed image
37+ run : |
38+ # Wait a moment for the image to be available
39+ sleep 5
40+
41+ # Pull the image we just pushed
42+ docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/feroxbuster:latest
43+
44+ # Get the digest of the pulled image
45+ PULLED_DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ${{ secrets.DOCKER_HUB_USERNAME }}/feroxbuster:latest | cut -d'@' -f2)
46+ PUSHED_DIGEST="${{ steps.docker_build.outputs.digest }}"
47+
48+ echo "Pushed digest: $PUSHED_DIGEST"
49+ echo "Pulled digest: $PULLED_DIGEST"
50+
51+ # Verify they match
52+ if [ "$PULLED_DIGEST" = "$PUSHED_DIGEST" ]; then
53+ echo "✓ Verification successful: Pulled image matches pushed image"
54+
55+ # Test that the binary works
56+ docker run --rm ${{ secrets.DOCKER_HUB_USERNAME }}/feroxbuster:latest --version
57+ else
58+ echo "✗ Verification failed: Digests do not match"
59+ exit 1
60+ fi
You can’t perform that action at this time.
0 commit comments