Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,15 @@ jobs:
electriccoinco/lightwalletd:latest

- name: Push to zodlinc
# crane copy with explicit --src-creds and --dst-creds avoids the
# docker login session conflict (both registries are docker.io but
# different org credentials).
env:
SRC_USER: ${{ secrets.DOCKERHUB_USERNAME }}
SRC_PASS: ${{ secrets.DOCKERHUB_PASSWORD }}
DST_USER: ${{ secrets.ZODLINC_DOCKERHUB_USERNAME }}
DST_PASS: ${{ secrets.ZODLINC_DOCKERHUB_PASSWORD }}
run: |
TAG="${{ github.event.release.tag_name }}"
go install github.com/google/go-containerregistry/cmd/crane@v0.21.8
# go install writes to GOPATH/bin, which is not on PATH in this job.
CRANE="$(go env GOPATH)/bin/crane"
"${CRANE}" copy \
--src-creds "${SRC_USER}:${SRC_PASS}" \
--dst-creds "${DST_USER}:${DST_PASS}" \
electriccoinco/lightwalletd:${TAG} zodlinc/lightwalletd:${TAG}
"${CRANE}" copy \
--src-creds "${SRC_USER}:${SRC_PASS}" \
--dst-creds "${DST_USER}:${DST_PASS}" \
electriccoinco/lightwalletd:latest zodlinc/lightwalletd:latest
# The source repo is public, so only the destination needs credentials.
"${CRANE}" auth login index.docker.io -u "${DST_USER}" -p "${DST_PASS}"
"${CRANE}" copy electriccoinco/lightwalletd:${TAG} zodlinc/lightwalletd:${TAG}
"${CRANE}" copy electriccoinco/lightwalletd:latest zodlinc/lightwalletd:latest
Loading