Skip to content

Commit

Permalink
Closes #4920 - Generate docker tags for Zammad major.minor and major …
Browse files Browse the repository at this point in the history
…versions
  • Loading branch information
mgruner committed Nov 17, 2023
1 parent 5e3e47c commit 8a6d068
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ jobs:
tags: |
type=sha,suffix=-arm64
- name: Get version tag in the old way
- name: Get incrementing Zammad version from the most recent tag
run: echo ZAMMAD_VERSION="$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')" >> $GITHUB_ENV

- name: Get Zammad major.minor version from the most recent tag
run: echo ZAMMAD_VERSION_MAJOR_MINOR="$(git describe --tags | cut -f1-2 -d.)" >> $GITHUB_ENV

- name: Get Zammad major version from the most recent tag
run: echo ZAMMAD_VERSION_MAJOR="$(git describe --tags | cut -f1 -d.)" >> $GITHUB_ENV

- name: Get tags for final multiarch reference
id: meta
uses: docker/metadata-action@v5
Expand All @@ -135,12 +141,10 @@ jobs:
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=raw,value=${{ env.ZAMMAD_VERSION }},enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=raw,value=zammad-${{ env.ZAMMAD_VERSION }},enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=raw,value=${{ env.ZAMMAD_VERSION_MAJOR_MINOR }},enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=raw,value=${{ env.ZAMMAD_VERSION_MAJOR }},enable=${{ github.ref == format('refs/heads/{0}', 'stable') }}
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{version}}
type=sha
- name: Create manifest list and push
Expand Down

0 comments on commit 8a6d068

Please sign in to comment.