GitHub Action
Render Redeploy Action
This is a simple GitHub Action that redeploys services hosted on Render's cloud platform.
This action could be useful in CI/CD pipelines that release Docker images and, as part of the pipeline, it's required to redeploy the services that are using those images so that they can run the latest versions.
First, make sure to define the necessary input for the Action. You'd have to provide a Render API key (for authentication with their APIs) and a Render service ID (used to identify the service you want to redeploy).
To do this, you can leverage GitHub
secrets
and
variables.
In short, go to your repository's Settings
tab and add the necessary
secrets and variables under Secrets and variables
then Actions
.
Add the following deploy
job in your Action.
deploy:
# Assuming the `docker-images` job builds the Docker images,
# we define a dependency on it.
needs: docker-images
runs-on: ubuntu-latest
steps:
- name: Deploy to Render
uses: qbaware/render-redeploy-action@v0
with:
render-api-key: ${{ secrets.RENDER_API_KEY }}
render-service-id: ${{ env.RENDER_SERVICE_ID }}