tree: ef9ce62884c2a144f8b7024e54901bc5a640245f [path history] [tgz]
  1. .gcloudignore
  2. README.md
  3. wikiwebhook.go
  4. wikiwebhook_test.go
cloudfns/wikiwebhook/README.md

Go Reference

golang.org/x/build/cloudfns/wikiwebhook

Package wikiwebhook implements an Google Cloud Function HTTP handler that expects GitHub webhook change events.

Deploying

To deploy, run the following command sequence in this directory:

DEPLOYDIR="$(mktemp -d)" && cp -R . ../../go.{mod,sum} "$DEPLOYDIR" && \
(cd "$DEPLOYDIR" && \
go mod edit -module golang.org/x/build/cloudfns/wikiwebhook && go mod tidy && go test ./... && \
gcloud functions deploy GitHubWikiChangeWebHook \
  --project=symbolic-datum-552 \
  --runtime go120 \
  --trigger-http \
  --set-env-vars="PUBSUB_TOPIC=github.webhooks.golang.go.wiki,GCP_PROJECT=symbolic-datum-552,GITHUB_WEBHOOK_SECRET=$(gcloud --project=symbolic-datum-552 secrets versions access latest --secret=github-webhook-secret)") && \
rm -rf "$DEPLOYDIR"