Skip to content

Commit a7d85c1

Browse files
committed
Tidy up Docker images
1 parent 125767a commit a7d85c1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
release:
6+
types: [published]
47

58
jobs:
69
test:
@@ -44,7 +47,7 @@ jobs:
4447

4548
push-docker:
4649
needs: test
47-
if: github.ref == 'refs/heads/main'
50+
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
4851
runs-on: ubuntu-latest
4952
permissions:
5053
contents: read
@@ -66,6 +69,12 @@ jobs:
6669
uses: docker/metadata-action@v5
6770
with:
6871
images: ghcr.io/${{ github.repository }}
72+
flavor: |
73+
latest=false
74+
tags: |
75+
type=raw,value=latest,enable={{is_default_branch}}
76+
type=semver,pattern={{version}}
77+
type=semver,pattern={{major}}.{{minor}}
6978
7079
- name: Build and push Docker image
7180
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)