Skip to content

Commit 30a8a0d

Browse files
committed
Simplify release script, using releases over tags
1 parent 0d4d8f8 commit 30a8a0d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Publish release to Docker Hub
22

3-
on:
4-
push:
5-
tags:
6-
- "*.*.*"
3+
on: release
74

85
jobs:
96
docker:
@@ -16,14 +13,8 @@ jobs:
1613
id: prep
1714
run: |
1815
DOCKER_IMAGE=coenjacobs/mozart
19-
VERSION=latest
20-
if [[ $GITHUB_REF == refs/tags/* ]]; then
21-
VERSION=${GITHUB_REF#refs/tags/v}
22-
fi
16+
VERSION=${{ github.event.release.tag_name }}
2317
TAGS="${DOCKER_IMAGE}:${VERSION}"
24-
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
25-
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
26-
fi
2718
echo ::set-output name=tags::${TAGS}
2819
2920
- name: Set up QEMU

0 commit comments

Comments
 (0)