Skip to content

Commit f3d71f2

Browse files
authored
ci: Fix Docker Image step fail on forks (#671)
We cannot (and don't need to) push to GHCR from forks.
1 parent 416fecd commit f3d71f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ jobs:
211211
context: .
212212
cache-from: type=gha,scope=prod
213213
cache-to: type=gha,mode=max,scope=prod
214-
platforms: linux/amd64,linux/arm64
215-
push: true
214+
platforms: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
215+
push: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'true' || 'false' }}
216+
load: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'false' || 'true' }}
216217
tags: ghcr.io/getsentry/spotlight:${{ github.sha }}
217218

218219
- name: Test Docker Image

0 commit comments

Comments
 (0)