CI: do not push Docker image ...

... when the workflow is ran in a forked repository

Signed-off-by: Zixing Liu <liushuyu011@gmail.com>
This commit is contained in:
liushuyu 2022-04-16 21:39:30 -06:00
parent 27ad3813dc
commit 82c045ecfe
No known key found for this signature in database
GPG Key ID: 23D1CE4534419437
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ jobs:
-
name: Login to DockerHub
uses: docker/login-action@v1
if: github.repository == 'Rust-GCC/gccrs'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -29,5 +30,5 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
push: true
push: ${{ github.repository == 'Rust-GCC/gccrs' }}
tags: philberty/gccrs:latest