Skip to content

Commit 82c045e

Browse files
committed
CI: do not push Docker image ...
... when the workflow is ran in a forked repository Signed-off-by: Zixing Liu <liushuyu011@gmail.com>
1 parent 27ad381 commit 82c045e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
-
2222
name: Login to DockerHub
2323
uses: docker/login-action@v1
24+
if: github.repository == 'Rust-GCC/gccrs'
2425
with:
2526
username: ${{ secrets.DOCKERHUB_USERNAME }}
2627
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -29,5 +30,5 @@ jobs:
2930
uses: docker/build-push-action@v2
3031
with:
3132
context: .
32-
push: true
33+
push: ${{ github.repository == 'Rust-GCC/gccrs' }}
3334
tags: philberty/gccrs:latest

0 commit comments

Comments
 (0)