Skip to content

Commit f974b98

Browse files
authored
Merge pull request #79 from kannkyo/fix-cannot-push-docker
Fix cannnot publish container
2 parents 1e51b9f + 98cfb37 commit f974b98

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,14 @@ jobs:
4141
with:
4242
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4343

44-
- name: Build and push container
45-
id: build-and-push
46-
if: ${{ github.ref_name != 'main' }}
47-
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v3.0.0
48-
with:
49-
context: .
50-
push: ${{ github.event_name != 'pull_request' }}
51-
tags: ${{ steps.meta.outputs.tags }}
52-
labels: ${{ steps.meta.outputs.labels }}
53-
platforms: linux/amd64,linux/arm64
54-
5544
- name: Build and push container
5645
id: build-and-push
5746
if: ${{ github.ref_name == 'main' }}
5847
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8 # v3.0.0
5948
with:
6049
context: .
6150
push: ${{ github.event_name != 'pull_request' }}
62-
tags: latest
51+
tags: ${{ (github.ref_name == 'main' && 'latest') || steps.meta.outputs.tags }}
6352
labels: ${{ steps.meta.outputs.labels }}
6453
platforms: linux/amd64,linux/arm64
6554

0 commit comments

Comments
 (0)