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:
parent
27ad3813dc
commit
82c045ecfe
|
@ -21,6 +21,7 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Login to DockerHub
|
name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
|
if: github.repository == 'Rust-GCC/gccrs'
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
@ -29,5 +30,5 @@ jobs:
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: ${{ github.repository == 'Rust-GCC/gccrs' }}
|
||||||
tags: philberty/gccrs:latest
|
tags: philberty/gccrs:latest
|
||||||
|
|
Loading…
Reference in New Issue