Skip to content

Commit 45deeb3

Browse files
authored
Log into GCR before pushing docs image (#160)
* Log into GCR before pushing docs image * Add changelog * Move changelog to latest version
1 parent 740262b commit 45deeb3

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.github/workflows/release.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,20 @@ jobs:
3535
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
3636
restore-keys: |
3737
${{ runner.os }}-go-
38+
- name: Login to gcloud registry
39+
id: gcloud
40+
uses: elgohr/[email protected]
41+
with:
42+
account_key: ${{ secrets.GCLOUD_KEY }}
3843
- name: Release
3944
if: github.event.release.tag_name
4045
env:
4146
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
4247
QUAY_IO_PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }}
4348
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4449
TAGGED_VERSION: ${{ github.event.release.tag_name }}
50+
GCR_USERNAME: ${{ steps.gcloud.outputs.username }}
51+
GCR_PASSWORD: ${{ steps.gcloud.outputs.password }}
4552
run: |
4653
docker login quay.io --username "solo-io+solobot" --password $QUAY_IO_PASSWORD
4754
make install-deps build-images operator-gen manifest-gen publish-images upload-github-release-assets publish-docs

changelog/v0.0.26/docs-publish.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
changelog:
2+
- type: NON_USER_FACING
3+
description: CI/CD login to gcloud before trying to push docs image to GCR

docs/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ SERVE_AS_LATEST_TAG:=$(VERSION)-latest
7979
## don't bother generating manifest, just copy/modify from docs-prod repo
8080
# docker-push-docs: site-release manifest
8181
docker-push-docs: site-release
82+
@echo "${GCR_PASSWORD}" | docker login -u ${GCR_USERNAME} --password-stdin gcr.io
8283
docker build \
8384
--build-arg VERSION=latest \
8485
--build-arg PRODUCT_SCOPE=$(PRODUCT_SCOPE) \

0 commit comments

Comments
 (0)