Skip to content

Commit 0b67176

Browse files
committed
ci: only publish docker images on releases
1 parent 68811b5 commit 0b67176

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

.github/workflows/publish-docker.yaml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Publish Docker image
22

33
on:
4-
workflow_run:
5-
workflows: ["CI/CD"]
6-
types:
7-
- completed
8-
branches:
9-
- main
104
release:
115
types: [published]
126

@@ -16,7 +10,6 @@ env:
1610

1711
jobs:
1812
build-and-push:
19-
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'release' }}
2013
runs-on: ubuntu-latest
2114
permissions:
2215
contents: read
@@ -42,12 +35,8 @@ jobs:
4235
with:
4336
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4437
tags: |
45-
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
46-
type=semver,pattern={{version}}
47-
type=sha,format=long
48-
type=ref,event=branch
49-
type=ref,event=tag
50-
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
38+
type=raw,value=${{ github.event.release.tag_name }}
39+
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }}
5140
5241
- name: Build and push Docker image
5342
uses: docker/build-push-action@v5

0 commit comments

Comments
 (0)