Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(CD): trigger render staging listening new release branch when creating release branch (#1727)

h3n4l8172758bf806
diff --git a/.github/workflows/update-render-staging-service.yml b/.github/workflows/update-render-staging-service.yml
new file mode 100644
index 0000000000..6cea884458
--- /dev/null
+++ b/.github/workflows/update-render-staging-service.yml
@@ -0,0 +1,36 @@
+name: Update render staging service
+
+on:
+ push:
+ branches:
+ - "release/*.*.*"
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ update-render:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Extract version
+ run: |
+ echo "RELEASE_VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_ENV
+ - name: Update render web service
+ run: |
+ RENDER_RESPONSE=$(curl --request PATCH \
+ -w %{http_code} \
+ --url https://api.render.com/v1/services/srv-c760lk4objdcv67lc6ug \
+ --header 'Accept: application/json' \
+ --header 'Authorization: Bearer ${{ secrets.RENDER_API_KEY }}' \
+ --header 'Content-Type: application/json' \
+ --data '
+ {
+ "autoDeploy": "yes",
+ "branch": "release/${{ env.RELEASE_VERSION }}"
+ }
+ '
+ )
+ echo ${RENDER_RESPONSE}
+ if [[ "$(echo ${RENDER_RESPONSE} | tail -n 1)" != "200" ]]; then
+ exit 1
+ fi