From e36e3cb6a9c2eb8495da2854c70e55c380fb46cd 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 12e8139fc..c98c3ee3b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -194,12 +194,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