Skip to content

Commit

Permalink
Merge pull request #19 from danfengliu/save-image-pkg
Browse files Browse the repository at this point in the history
save-image-pkg
  • Loading branch information
danfengliu authored Nov 7, 2022
2 parents ac71bee + 40f38a3 commit 9263298
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,22 @@ jobs:
with:
version: latest

# 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
# Push image to GCR to facilitate some environments that have rate limitation to docker hub, e.g. vSphere.
- name: Publish container image to GCP
run: |
source hack/ci/build_util.sh
echo 1 > 1.txt
uploader 1.txt velero-builds
VELERO_IMAGE=velero-main
VELERO_RESTORE_HELPER_IMAGE=velero-restore-helper-main
cp $VELERO_IMAGE $VELERO_IMAGE-'build.'$GITHUB_RUN_NUMBER
cp $VELERO_RESTORE_HELPER_IMAGE $VELERO_RESTORE_HELPER_IMAGE-'build.'$GITHUB_RUN_NUMBER
uploader ${VELERO_IMAGE}.tar.gz velero-builds
uploader ${VELERO_RESTORE_HELPER_IMAGE}.tar.gz velero-builds
uploader ${VELERO_IMAGE}-'build.'$GITHUB_RUN_NUMBER.tar.gz velero-builds
uploader ${VELERO_RESTORE_HELPER_IMAGE}-'build.'$GITHUB_RUN_NUMBER.tar.gz velero-builds
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ endif
--build-arg=RESTIC_VERSION=$(RESTIC_VERSION) \
-f $(VELERO_DOCKERFILE) .
@echo "container: $(IMAGE):$(VERSION)"
@docker save $(IMAGE):$(VERSION) > $(BIN)-$(VERSION).tar && @gzip $(BIN)-$(VERSION).tar


SKIP_TESTS ?=
test: build-dirs
Expand Down

0 comments on commit 9263298

Please sign in to comment.