mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-09 14:43:24 +00:00
Don't attempt to publish docker images on forks (#2953)
* Don't attempt to publish docker images on forks When the Main CI workflow runs on a fork, the docker push step will always fail because the appropriate secrets are missing. This is annoying at best and causes CI on forks to be untrustworthy at worst. Signed-off-by: Nolan Brubaker <brubakern@vmware.com> * Use single quotes for string, as github expects Signed-off-by: Nolan Brubaker <brubakern@vmware.com>
This commit is contained in:
2
.github/workflows/push-builder.yml
vendored
2
.github/workflows/push-builder.yml
vendored
@@ -17,7 +17,9 @@ jobs:
|
||||
- name: Build
|
||||
run: make build-image
|
||||
|
||||
# Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures.
|
||||
- name: Publish container image
|
||||
if: github.repository == 'vmware-tanzu/velero'
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
|
||||
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
@@ -35,7 +35,9 @@ jobs:
|
||||
- name: Test
|
||||
run: make test
|
||||
|
||||
# Only try to publish the container image from the root repo; forks don't have permission to do so and will always get failures.
|
||||
- name: Publish container image
|
||||
if: github.repository == 'vmware-tanzu/velero'
|
||||
run: |
|
||||
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
|
||||
./hack/docker-push.sh
|
||||
|
||||
Reference in New Issue
Block a user