Skip to content

Commit

Permalink
fix: docker image tags
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxity committed Mar 21, 2024
1 parent 5b8760a commit 8892fb5
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/server-ci-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set version
id: version
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/v}"
- name: Extract metadata (tags, labels) for Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/tuxity/mattermost-enterprise-edition
flavor: |
latest=false
tags: |
type=semver,pattern={{version}},value=${{ github.ref_name }}
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/v') }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand All @@ -88,7 +94,6 @@ jobs:
MM_PACKAGE=file:///tmp/mattermost-enterprise-linux-amd64.tar.gz
platforms: linux/amd64
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: |
ghcr.io/tuxity/mattermost-enterprise-edition:${{ steps.version.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 8892fb5

Please sign in to comment.