Skip to content

Commit 63eda8a

Browse files
committed
CI: Only tag image latest on tag builds
1 parent d54c3f3 commit 63eda8a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/release-ghcr.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ jobs:
6161
docker-archive:./result \
6262
docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:$IMAGE_TAG
6363
64-
# Also tag it as latest
65-
skopeo copy \
66-
docker-archive:./result \
67-
docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:latest
64+
# If it's a tag build, also tag it as latest
65+
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
66+
skopeo copy \
67+
docker-archive:./result \
68+
docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:latest
69+
fi
6870
6971
- name: Upload ${{ github.actor }}/cardano-smash-server
7072
run: |
@@ -76,7 +78,9 @@ jobs:
7678
docker-archive:./result \
7779
docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:$IMAGE_TAG
7880
79-
# Also tag it as latest
80-
skopeo copy \
81-
docker-archive:./result \
82-
docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:latest
81+
# If it's a tag build, also tag it as latest
82+
if [[ "$GITHUB_REF_TYPE" = "tag" ]]; then
83+
skopeo copy \
84+
docker-archive:./result \
85+
docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:latest
86+
fi

0 commit comments

Comments
 (0)