blob: 2c13ebae89fec9b76dce28f0822edd22ff760690 [file] [log] [blame] [view]
<!-- Auto-generated by x/build/update-readmes.go -->
[![Go Reference](https://pkg.go.dev/badge/golang.org/x/build/cloudfns/wikiwebhook.svg)](https://pkg.go.dev/golang.org/x/build/cloudfns/wikiwebhook)
# golang.org/x/build/cloudfns/wikiwebhook
Package wikiwebhook implements an Google Cloud Function HTTP handler that expects GitHub webhook change events.
<!-- End of auto-generated section -->
## Deploying
To deploy, run the following command sequence in this directory:
```sh
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"
```