Skip to content

Commit 4d81db3

Browse files
committed
push on tags
1 parent 59f7195 commit 4d81db3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/package_deploy.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Deploy Image to GitHub Packages
22

3-
on: [push]
3+
on:
4+
push:
5+
tags:
6+
- '*'
47

58
env:
69
REGISTRY: ghcr.io
@@ -26,11 +29,6 @@ jobs:
2629
sed -i "s#^REPO_NAME=.*#REPO_NAME=${REPO_NAME}#" Makefile
2730
sed -i "s#^IMAGE_VERSION=.*#IMAGE_VERSION=${IMAGE_VERSION}#" Makefile
2831
29-
- name: cat Makefile
30-
run: |
31-
cat Makefile
32-
33-
3432
- name: Log in to the Container registry
3533
uses: docker/login-action@v1
3634
with:
@@ -40,20 +38,16 @@ jobs:
4038

4139
- name: Check Docker Image Existence
4240
run: |
43-
echo "$REGISTRY/$REPO_NAME:$IMAGE_VERSION"
4441
if docker pull "$REGISTRY/$REPO_NAME:$IMAGE_VERSION"; then
4542
echo "Version already built $REGISTRY/$REPO_NAME:$IMAGE_VERSION, aborting." >&2
4643
exit 1
4744
fi
4845
4946
- name: Build Docker Image using Makefile
5047
run: make build
51-
52-
- name: List Generated Images
53-
run: docker image ls
5448

5549
- name: Push Image to GitHub Packages
5650
run: |
5751
echo "$REGISTRY/$REPO_NAME:$IMAGE_VERSION"
5852
docker push "$REGISTRY/$REPO_NAME:$IMAGE_VERSION"
59-
docker push "$REGISTRY/$REPO_NAME:latest"
53+
docker push "$REGISTRY/$REPO_NAME:latest"

0 commit comments

Comments
 (0)