Skip to content

Commit b8ee9b0

Browse files
authored
Update test.yml
1 parent 3d92bf2 commit b8ee9b0

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ name: Build and Publish Releases to Hub
33
on:
44
push:
55
tags:
6-
- "v*.*.*"
7-
branches:
8-
- master
9-
- main
6+
- "*.*.*"
107
workflow_dispatch:
118

129
jobs:
@@ -19,14 +16,15 @@ jobs:
1916
- name: Prepare
2017
id: prep
2118
run: |
19+
MAIN_VERSION=$(python3 -c 'import __version__ ; print(str(__version__.__version__)[:5])')
2220
DOCKER_IMAGE=janssenproject/$(python3 -c 'import os ; REPO = os.environ.get("GITHUB_REPOSITORY") ; print(str(REPO).split("/")[1][12:])')
23-
VERSION=1.0.0_dev
21+
VERSION=${MAIN_VERSION}_dev
2422
if [[ $GITHUB_REF == refs/tags/* ]]; then
25-
VERSION=${GITHUB_REF#refs/tags/v}
23+
VERSION=${GITHUB_REF#refs/tags/}
2624
fi
2725
TAGS="${DOCKER_IMAGE}:${VERSION}"
28-
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
29-
TAGS="$TAGS,${DOCKER_IMAGE}:dev"
26+
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\_[a-b]{1}[0-9]{1,3}$ ]]; then
27+
TAGS="$TAGS,${DOCKER_IMAGE}:${MAIN_VERSION}_dev"
3028
fi
3129
echo ::set-output name=tags::${TAGS}
3230

0 commit comments

Comments
 (0)