No real logic changes or anything was made. Just versioning changing and trying to reduce the surface area for security issues.
- Updated the Docker image for
nodeto 19.5. We need to get this toltsbut as long as it is above16that is better. - Remove
isomorphic-fetch. The defaultfetchseems fine to use and this is just another thing we'd need to keep an eye on. - Update all packages as much as possible without needing to make any large changes.
- Removed the
.githubsettings. Since we will not be using those I took them out.
Merging to master automatically builds and deploys to production via GitHub Actions (.github/workflows/deploy.yml). The workflow:
- Runs ESLint and Prettier checks
- Builds a
linux/amd64Docker image fromDockerfile - Pushes to Artifact Registry as both
:latestand:<7-char-sha> - Deploys the new revision to the
webhook-proxyCloud Run service
To roll back to a previous revision, find the SHA tag in Artifact Registry and run:
gcloud run deploy webhook-proxy \
--image us-central1-docker.pkg.dev/estuary-marketing/strapi/webhook-proxy:<sha> \
--region us-central1 \
--project estuary-marketingA super simple & lightweight Node.js proxy to send repository_dispatch events to GitHub from a Strapi Webhook.
Useful when you want to run a GitHub Actions workflow when changes are made in Strapi.
1 - Ensure your GitHub Actions workflow file handles the "repository_dispatch" event with your custom type:
name: Deploy
on:
repository_dispatch:
types: [strapi_updated]2 - Create a GitHub Personal access token with repo scope
3 - Deploy the service to your server, for example:
4 - Create a new Webhook in Strapi that points to the service with the following query params:
event_type: Any string. This value must match therepository_dispatchtype specified in your GitHub Actions workflow file.
For example:
http://actions-proxy:5000/api?event_type=strapi_updated&repo=username/awesome-website
You can't point Strapi webhooks to the repository dispatch event endpoint as the webook request body is not compatible with the dispatches endpoint, thus a proxy is required.
See CONTRIBUTING.md
See LICENSE.md