Skip to content

Commit 8fb28ef

Browse files
ci: run for tags only
1 parent d6b8d4f commit 8fb28ef

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: CI
2-
on: [push]
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
37

48
jobs:
59
build-and-push-image:
@@ -14,10 +18,13 @@ jobs:
1418
registry: ghcr.io
1519
username: ${{ github.actor }}
1620
password: ${{ secrets.GITHUB_TOKEN }}
17-
- name: Build and push image
21+
- name: Extract version
1822
run: |
19-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
20-
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
21-
echo $IMAGE_ID
22-
docker build . -t ${IMAGE_ID}
23-
docker push ${IMAGE_ID}:latest
23+
echo $GITHUB_REF
24+
# - name: Build and push image
25+
# run: |
26+
# IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
27+
# IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
28+
# echo $IMAGE_ID
29+
# docker build . -t ${IMAGE_ID}
30+
# docker push ${IMAGE_ID}:latest

0 commit comments

Comments
 (0)