Skip to content

Commit

Permalink
Only publish image if not from fork
Browse files Browse the repository at this point in the history
  • Loading branch information
niklhut committed Jun 22, 2024
1 parent cc8ef1f commit a55a8ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Log in to Container registry
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -62,6 +63,7 @@ jobs:
# set latest tag for default branch
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: docker/build-push-action@v6
with:
context: .
Expand Down

0 comments on commit a55a8ba

Please sign in to comment.