Skip to content

Commit 1f52e6d

Browse files
authored
added latest tag to ghcr for master pushes (#128)
1 parent cdabe06 commit 1f52e6d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,19 @@ jobs:
245245
password: ${{ secrets.GITHUB_TOKEN }}
246246
logout: true
247247
- run: echo "GHCR LOGIN SUCCESSFUL"
248-
- name: Build and push image
248+
- if: ${{ github.ref_name == 'master' }}
249+
name: Build and push image for master
250+
run: |
251+
docker context create buildx-build
252+
docker buildx create --use buildx-build
253+
docker buildx build \
254+
-t ghcr.io/segmentio/topicctl:${SHORT_SHA} \
255+
-t ghcr.io/segmentio/topicctl:latest \
256+
--build-arg VERSION=${SHORT_SHA} \
257+
--push \
258+
.
259+
- if: ${{ github.ref_name == 'v0' }}
260+
name: Build and push image for v0
249261
run: |
250262
docker context create buildx-build
251263
docker buildx create --use buildx-build

0 commit comments

Comments
 (0)