Skip to content

Commit

Permalink
fix(docker-build): fix docker image tags
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Feb 29, 2024
1 parent 9dfdc32 commit ff3bdd5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v*'

jobs:
run:
Expand All @@ -22,15 +22,19 @@ jobs:
echo "github.ref -> {{ github.ref }}"
- name: Docker metadata
id: metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMG_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
flavor: |
latest=true
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -48,9 +52,9 @@ jobs:
context: .
push: true # push to registry
pull: true # always fetch the latest base images
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down

0 comments on commit ff3bdd5

Please sign in to comment.