golang.org/x/build@v0.0.0-20240506185731-218518f32b70/cloudfns/sendwikidiff/README.md (about) 1 <!-- Auto-generated by x/build/update-readmes.go --> 2 3 [](https://pkg.go.dev/golang.org/x/build/cloudfns/sendwikidiff) 4 5 # golang.org/x/build/cloudfns/sendwikidiff 6 7 Package sendwikidiff implements a Google Cloud background function that reacts to a pubsub message containing a GitHub webhook change payload. 8 <!-- End of auto-generated section --> 9 10 ## Deploying 11 12 To deploy, run the following command sequence in this directory: 13 14 ```sh 15 DEPLOYDIR="$(mktemp -d)" && cp -R . ../../go.{mod,sum} "$DEPLOYDIR" && \ 16 (cd "$DEPLOYDIR" && \ 17 go mod edit -module golang.org/x/build/cloudfns/sendwikidiff && go mod tidy && go test ./... && \ 18 gcloud functions deploy HandleWikiChangePubSub \ 19 --project=symbolic-datum-552 \ 20 --runtime go120 \ 21 --trigger-topic github.webhooks.golang.go.wiki \ 22 --memory 1024 \ 23 --set-env-vars="SENDGRID_API_KEY=$(gcloud --project=symbolic-datum-552 secrets versions access latest --secret=sendgrid-sendonly-api-key)") && \ 24 rm -rf "$DEPLOYDIR" 25 ```