File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,22 @@ jobs:
41
41
name : Copy composer installation file
42
42
run : |
43
43
cp ./install-composer.sh ./${{ matrix.directory }}
44
- -
45
- name : Build and push
46
- uses : docker/build-push-action@v6
47
- with :
48
- context : .
49
- file : ${{ matrix.directory }}/Dockerfile
50
- push : false
51
- tags : ${{ matrix.tagging }}
44
+
45
+ - name : Query existing Docker image tags
46
+ run : |
47
+ TAG_EXISTS=$(curl -s "https://hub.docker.com/v2/repositories/${{ matrix.image }}/tags/?page_size=100" | jq -r '.results[].name' | grep -w "${{ matrix.tagging }}" || true)
48
+ if [ -n "$TAG_EXISTS" ]; then
49
+ echo "Tag ${{ matrix.tagging}} already exists!"
50
+ else
51
+ echo "Tag ${{ matrix.tagging}} does not exist, proceed with building the image."
52
+ fi
53
+
54
+ # -
55
+ # name: Build and push
56
+ # uses: docker/build-push-action@v6
57
+ # with:
58
+ # context: .
59
+ # file: ${{ matrix.directory }}/Dockerfile
60
+ # push: false
61
+ # load: true
62
+ # tags: ${{ matrix.tagging }}
You can’t perform that action at this time.
0 commit comments