Skip to content

Commit 591f4c6

Browse files
[CI] Don't try to login/push docker images on forks
1 parent 862a4fd commit 591f4c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/reusable_dockers_build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ jobs:
2828
run: |
2929
docker build -f .github/docker/${{ matrix.os }}.Dockerfile -t ${{ env.IMG }} .
3030
31+
# Login and push require login/pass to GHCR - omit these steps on forks
3132
- name: Login to GitHub Container Registry
32-
if: github.event_name != 'pull_request'
33+
if: ${{ github.event_name != 'pull_request' && github.repository == 'oneapi-src/unified-memory-framework' }}
3334
uses: docker/login-action@6d4b68b490aef8836e8fb5e50ee7b3bdfa5894f0 # v3.2.0
3435
with:
3536
registry: ghcr.io
3637
username: bb-ur
3738
password: ${{ secrets.BB_GHCR_TOKEN }}
3839

3940
- name: Push ${{ matrix.os }} Docker image
40-
if: github.event_name != 'pull_request'
41+
if: ${{ github.event_name != 'pull_request' && github.repository == 'oneapi-src/unified-memory-framework' }}
4142
run: |
4243
docker push ${{ env.IMG }}

0 commit comments

Comments
 (0)