Skip to content

Commit 12387f8

Browse files
author
Bohan Chen
committed
login to docker before pushing lifecycle image
it seems that we were relying on a race condition of another job logging into docker before we push/relocate the lifecycle image Signed-off-by: Bohan Chen <bohanc@vmware.com>
1 parent cc28885 commit 12387f8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,20 @@ jobs:
190190
steps:
191191
- name: Checkout
192192
uses: actions/checkout@v3
193+
- name: Docker Login
194+
uses: docker/login-action@v2.2.0
195+
with:
196+
registry: ${{ secrets.REGISTRY_HOST }}
197+
username: ${{ secrets.REGISTRY_USER }}
198+
password: ${{ secrets.REGISTRY_PASSWORD }}
193199
- name: Set up Go
194200
uses: actions/setup-go@v4
195201
with:
196202
go-version-file: 'go.mod'
197203
- name: Build
198204
run: |
205+
trap 'echo -e "$output"' EXIT
206+
199207
output=$(go run ./hack/lifecycle/main.go --tag=${{ env.PUBLIC_IMAGE_DEV_REPO }}/lifecycle 2>&1)
200208
image=$(echo "$output" | grep "saved lifecycle" | awk -F "saved lifecycle image: " '{print $2}')
201209
mkdir images

0 commit comments

Comments
 (0)