Skip to content

Commit

Permalink
Build only on version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Mar 24, 2024
1 parent d9d2d3d commit bad104a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build Docker images

on: ["push"]
on:
push:
tags:
- 'v*.*.*'

jobs:
docker:
Expand All @@ -27,14 +30,12 @@ jobs:
with:
images: |
ghcr.io/${{ matrix.image }}
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=tag
type=semver,pattern={{version}}
type=sha
latest
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# So now you can use Actions' own caching!
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
Expand All @@ -49,3 +50,4 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64 # Specify platforms here.

0 comments on commit bad104a

Please sign in to comment.