Skip to content

Commit

Permalink
set image tag based on release
Browse files Browse the repository at this point in the history
  • Loading branch information
maaikelimper authored Jan 14, 2025
1 parent bb5afbc commit 67ae251
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_and_publish_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# separate terms of service, privacy policy, and support
# documentation.

name: publish images to ghrc.io and docker-hub
name: Publish images to ghcr.io and Docker Hub

on:
push:
Expand Down Expand Up @@ -58,8 +58,8 @@ jobs:
${{ env.DOCKER_ORG }}/${{ matrix.image }}
ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=pep440,pattern={{version}}
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push
uses: docker/[email protected]
Expand All @@ -68,7 +68,7 @@ jobs:
file: ./Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64, linux/amd64
platforms: linux/arm64,linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 67ae251

Please sign in to comment.