From f4f442ff694734b3f81c50136aea753cf22e0d8f Mon Sep 17 00:00:00 2001 From: Robert Scheck Date: Fri, 3 May 2024 23:50:18 +0200 Subject: [PATCH] Don't try to login and push to GHCR on forks --- .github/workflows/build-container.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 47c1d99..df094f7 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -48,6 +48,7 @@ jobs: type=sha - name: Login to GitHub Container Registry + if: github.repository_owner == 'bgp' uses: docker/login-action@v3 with: registry: ghcr.io @@ -60,5 +61,5 @@ jobs: file: .github/images/alpine:3.Dockerfile context: . platforms: linux/amd64,linux/arm64 - push: true + push: ${{ github.repository_owner == 'bgp' }} tags: ${{ steps.meta.outputs.tags }}