From 12387f881ff0ee2d520290e96f1e542c3cb37252 Mon Sep 17 00:00:00 2001 From: Bohan Chen Date: Tue, 25 Jul 2023 15:50:25 -0400 Subject: [PATCH] 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 --- .github/workflows/ci.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ea349ae47..ebdb89579 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -190,12 +190,20 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Docker Login + uses: docker/login-action@v2.2.0 + with: + registry: ${{ secrets.REGISTRY_HOST }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_PASSWORD }} - name: Set up Go uses: actions/setup-go@v4 with: go-version-file: 'go.mod' - name: Build run: | + trap 'echo -e "$output"' EXIT + output=$(go run ./hack/lifecycle/main.go --tag=${{ env.PUBLIC_IMAGE_DEV_REPO }}/lifecycle 2>&1) image=$(echo "$output" | grep "saved lifecycle" | awk -F "saved lifecycle image: " '{print $2}') mkdir images