Skip to content

Commit dfd691f

Browse files
authored
chore: Use semantic versions
1 parent 15da83d commit dfd691f

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ jobs:
3737
platforms: amd64,arm64
3838
- name: setup buildx
3939
uses: docker/setup-buildx-action@v2
40-
- name: create version string
41-
id: version
42-
run: |
43-
if [ "${GITHUB_REF##*/}" == "master" ]; then
44-
echo "VERSION=3.3.0-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
45-
else
46-
BRANCH_TO_DOCKER=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9._-]//g')
47-
echo "VERSION=${BRANCH_TO_DOCKER}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
48-
fi
4940
- name: Log in to Docker Hub
5041
uses: docker/login-action@v2
5142
with:
@@ -58,11 +49,11 @@ jobs:
5849
push: true
5950
file: Dockerfile-yaml
6051
platforms: linux/amd64,linux/arm64
61-
tags: wurstbrot/dsomm-yaml-generation:${{ env.VERSION }},wurstbrot/dsomm-yaml-generation:latest
52+
tags: wurstbrot/dsomm-yaml-generation:${{ steps.get-version.outputs.version }},wurstbrot/dsomm-yaml-generation:latest
6253
- name: create and push dsomm image
6354
uses: docker/build-push-action@v3
6455
with:
6556
push: true
6657
platforms: linux/amd64,linux/arm64
67-
tags: wurstbrot/dsomm:${{ env.VERSION }},wurstbrot/dsomm:latest
58+
tags: wurstbrot/dsomm:${{ steps.get-version.outputs.version }},wurstbrot/dsomm:latest
6859

0 commit comments

Comments
 (0)