Skip to content

Commit fc956b2

Browse files
authored
[docker] Push version tagged image on release (#195)
1 parent cd6d0a1 commit fc956b2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/image.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
push:
55
branches:
66
- master
7+
release:
8+
types:
9+
- created
10+
711

812
jobs:
913
build:
@@ -24,9 +28,16 @@ jobs:
2428
run: echo ${{ steps.buildx.outputs.platforms }}
2529
- name: login to docker hub
2630
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
27-
- name: build the image
31+
- name: tag and push devel image
32+
run: |
33+
docker build --push \
34+
--tag dmstraub/gramps-webapi:latest-devel \
35+
--platform linux/amd64,linux/arm/v7,linux/arm64 .
36+
- name: tag and push release image
37+
if: github.event_name == 'release'
2838
run: |
2939
docker build --push \
40+
--tag dmstraub/gramps-webapi:${{ github.event.release.tag_name }} \
3041
--tag dmstraub/gramps-webapi:latest \
3142
--platform linux/amd64,linux/arm/v7,linux/arm64 .
3243

0 commit comments

Comments
 (0)