Tiny node server to make Render deploy status available for use in a README badge. Motivated by this post. The badge above is using this service to get its own status 😎.
This project is mentioned in the Render community and on the Feature request board.
You can use this repo to deploy your own Render Web Service that will make a publicly available deploy status for another Render Web Service. You can then use with a Shields.io Dynamic JSON Badge to make this status available in that projects README.
- Create a new Render Web Service and choose "Deploy an existing image from a registry"
- Use this projects latest docker image available at
ghcr.io/cutaiar/render-deploy-status:latest
- In your Render account settings, generate an API Key and add it to the web service's environment variables with a key of
API_KEY
- Once deployed, this web service can expose the deploy status of any of your Render services including itself
- Find the
serviceId
of the Render service you are interested in creating a badge for (goto the service's home page and check the url forsrv-*
) - Visit
<this-render-web-service-url>/<your-service-id>
in your browser (orcurl
it in the terminal) to test the endpoint (i.e.https://render-deploy-status.onrender.com/srv-abc
). The response will be in the form{"status":"success"}
- Create a Shields.io Dynamic JSON Badge with the endpoint being the endpoint above and use that in your desired projects README
Note: Image-backed Render services do not automatically redeploy. So if you want to get the latest version, you should periodically trigger a manual deploy.
- Clone this repo
- Run
npm i
- Run
npm start
to start a local server ornpm run serve
to host the local server with hot reload - Find the
serviceId
of the Render service you are interested in creating a badge for (goto the services home page and check the url forsrv-*
) - Visit
http://localhost:3001/<your-service-id>
in your browser to test the endpoint
To get logging out the app, set the environment variable DEBUG=main
.
To release a new version:
- Bump the version using
npm version <major|minor|patch>
- Push the tag this created using
git push origin <new version>
This will trigger the build-publish-deploy-image.yml
workflow which will build a docker image, publish it to the Github Container Registry, and trigger a deploy on Render. Since this new image also has the latest
tag, it will be image Render deploys.
- Check app against Express best practices again
- Consider using a Shields.io Endpoint Badge
- Context aware colors for the badge (red for failed, green for success, etc.)