Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy new Go binaries automatically using goreleaser and google cloud build #13

Open
jjbuchan opened this issue May 18, 2021 · 0 comments

Comments

@jjbuchan
Copy link
Owner

Go releaser automation builds go binaries for several different platforms.

There are specific instructions for setting this up for google cloud build.
https://goreleaser.com/ci/#google-cloudbuild

  • Generate a github personal access token with the following permissions:
    repo:status Access commit status
    repo_deployment Access deployment status
    public_repo Access public repositories
  • Save the personal access token (will later encrypt this using KMS)
  • setup a keyring and key using the following instructions https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-secrets-credentials
  • using gcloud tool you can encrypt the token using the following example
echo -n $MY_SECRET | gcloud kms encrypt \
  --plaintext-file=- \  # - reads from stdin
  --ciphertext-file=- \  # - writes to stdout
  --location=global \
  --keyring=[KEYRING-NAME] \
  --key=[KEY-NAME] | base64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant