Skip to content

Commit

Permalink
build(docker): improve docker workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cshum committed Aug 1, 2022
1 parent e019af3 commit 5dff3f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ jobs:
with:
images: |
name=${{ format('ghcr.io/{0}', github.repository) }},enable=true
name=shumc/imagor,enable=${{ github.action_repository == 'cshum' }}
name=shumc/imagor,enable=${{ github.repository == 'cshum/imagor' }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image tag
if: github.ref_type == 'tag'
if: startsWith(github.ref, 'refs/tags/v')
id: build-and-push-tag
uses: docker/build-push-action@v3
with:
Expand All @@ -82,7 +82,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image branch
if: github.event.ref_type == 'branch'
if: startsWith(github.ref, 'refs/heads')
id: build-and-push-branch
uses: docker/build-push-action@v3
with:
Expand Down

0 comments on commit 5dff3f6

Please sign in to comment.