Allow cloud build to authenticate to gh when generating changelog

This commit is contained in:
Katrina Verey
2023-02-01 17:25:57 -05:00
parent 5cdc080406
commit 7e3ad53890

View File

@@ -43,6 +43,8 @@ steps:
entrypoint: /bin/bash entrypoint: /bin/bash
dir: myClone dir: myClone
secretEnv: ['GITHUB_TOKEN'] secretEnv: ['GITHUB_TOKEN']
env:
- 'GITHUB_USERNAME=KnVerey' # used to make authenticated curl requests to Github in releasing/compile-changelog.sh
args: args:
- releasing/cloudbuild.sh - releasing/cloudbuild.sh
- $TAG_NAME - $TAG_NAME
@@ -59,6 +61,7 @@ timeout: 14m
# The base64 of that is shown below. It's decrypted by cloud build # The base64 of that is shown below. It's decrypted by cloud build
# and provided back to goreleaser. # and provided back to goreleaser.
# IMPORTANT: make sure the token does not end with a newline when you encrypt it! # IMPORTANT: make sure the token does not end with a newline when you encrypt it!
# IMPORTANT: update the GITHUB_USERNAME env var above to match the github user whose token this is
secrets: secrets:
- kmsKeyName: projects/k8s-staging-kustomize/locations/global/keyRings/kust-cloud-key-ring/cryptoKeys/kust-cloud-key-name - kmsKeyName: projects/k8s-staging-kustomize/locations/global/keyRings/kust-cloud-key-ring/cryptoKeys/kust-cloud-key-name
secretEnv: secretEnv: