Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/dispatch_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Dispatch Deploy

on:
workflow_dispatch:
inputs:
version:
description: 'Version to deploy (no leading v). Leave blank to let the downstream pick the latest release. Example: 2.94.1'
required: false
type: string
workflow_call:
inputs:
version:
description: 'Version to deploy (no leading v).'
required: true
type: string

permissions: {}

jobs:
dispatch:
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.GH_APP_LIBS_PR_MANAGER_ID }}
private-key: ${{ secrets.GH_APP_LIBS_PR_MANAGER_PRIVATE_KEY }}
owner: supabase

- name: Dispatch version update
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
TARGET_REPO: ${{ secrets.DEPLOY_TARGET_REPO }}
VERSION: ${{ inputs.version }}
SOURCE: ${{ github.event_name == 'workflow_dispatch' && 'manual-dispatch' || 'realtime-release' }}
run: |
gh api "repos/${TARGET_REPO}/dispatches" \
--method POST \
--field event_type=realtime-release \
--field "client_payload[version]=${VERSION}" \
--field "client_payload[source]=${SOURCE}"
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
27 changes: 5 additions & 22 deletions .github/workflows/prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,30 +175,13 @@ jobs:
public.ecr.aws/supabase/realtime:v${{ needs.release.outputs.version }}
ghcr.io/supabase/realtime:v${{ needs.release.outputs.version }}

notify-platform:
dispatch-deploy:
needs: [release, merge_manifest]
runs-on: blacksmith-2vcpu-ubuntu-2404
if: needs.release.outputs.published == 'true'
steps:
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.GH_APP_LIBS_PR_MANAGER_ID }}
private-key: ${{ secrets.GH_APP_LIBS_PR_MANAGER_PRIVATE_KEY }}
owner: supabase

- name: Dispatch platform version update
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PLATFORM_REPO: ${{ secrets.PLATFORM_REPO }}
VERSION: ${{ needs.release.outputs.version }}
run: |
gh api "repos/${PLATFORM_REPO}/dispatches" \
--method POST \
--field event_type=realtime-release \
--field "client_payload[version]=${VERSION}" \
--field "client_payload[source]=realtime-release"
uses: ./.github/workflows/dispatch_deploy.yml
secrets: inherit
with:
version: ${{ needs.release.outputs.version }}

update-branch-name:
needs: [release, docker_x86_release, docker_arm_release, merge_manifest]
Expand Down
Loading