diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 34e8686f..be210bba 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -35,6 +35,11 @@ jobs: key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} restore-keys: | ${{ runner.os }}-go- + - name: Login to gcloud registry + id: gcloud + uses: elgohr/gcloud-login-action@0.2 + with: + account_key: ${{ secrets.GCLOUD_KEY }} - name: Release if: github.event.release.tag_name env: @@ -42,6 +47,8 @@ jobs: QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAGGED_VERSION: ${{ github.event.release.tag_name }} + GCR_USERNAME: ${{ steps.gcloud.outputs.username }} + GCR_PASSWORD: ${{ steps.gcloud.outputs.password }} run: | docker login quay.io --username "solo-io+solobot" --password $QUAY_IO_PASSWORD make install-deps build-images operator-gen manifest-gen publish-images upload-github-release-assets publish-docs diff --git a/changelog/v0.0.26/docs-publish.yaml b/changelog/v0.0.26/docs-publish.yaml new file mode 100644 index 00000000..3e7e0fec --- /dev/null +++ b/changelog/v0.0.26/docs-publish.yaml @@ -0,0 +1,3 @@ +changelog: + - type: NON_USER_FACING + description: CI/CD login to gcloud before trying to push docs image to GCR diff --git a/docs/Makefile b/docs/Makefile index 6128dfff..1b95ce5e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -79,6 +79,7 @@ SERVE_AS_LATEST_TAG:=$(VERSION)-latest ## don't bother generating manifest, just copy/modify from docs-prod repo # docker-push-docs: site-release manifest docker-push-docs: site-release + @echo "${GCR_PASSWORD}" | docker login -u ${GCR_USERNAME} --password-stdin gcr.io docker build \ --build-arg VERSION=latest \ --build-arg PRODUCT_SCOPE=$(PRODUCT_SCOPE) \