File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Test Image Exists
2+
3+ on :
4+ workflow_dispatch : # Allows you to trigger this manually from GitHub UI
5+
6+ env :
7+ REGISTRY : nvcr.io
8+ REPO : nvstaging/mellanox/network-operator
9+ TAG : v25.4.0-beta.1 # You can change this or pass via workflow input
10+
11+ jobs :
12+ check-image :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Install skopeo
17+ run : |
18+ sudo apt-get update
19+ sudo apt-get install -y skopeo
20+
21+ - name : Login to registry
22+ uses : docker/login-action@v3
23+ with :
24+ registry : ${{ env.REGISTRY }}
25+ username : ${{ secrets.NVCR_USERNAME }}
26+ password : ${{ secrets.NVCR_TOKEN }}
27+
28+ - name : Check if image exists
29+ run : |
30+ IMAGE="docker://${{ env.REGISTRY }}/${{ env.REPO }}:${{ env.TAG }}"
31+ echo "Checking for image: $IMAGE"
32+ if skopeo inspect "$IMAGE" > /dev/null 2>&1; then
33+ echo "✅ Image exists!"
34+ else
35+ echo "❌ Image does not exist."
36+ exit 1
37+ fi
You can’t perform that action at this time.
0 commit comments