diff --git a/.github/workflows/discord-posts.yml b/.github/workflows/discord-posts.yml index b1e55497401..f64e7862dc3 100644 --- a/.github/workflows/discord-posts.yml +++ b/.github/workflows/discord-posts.yml @@ -20,6 +20,7 @@ jobs: sudo apt-get update sudo apt-get install -y gh + # TODO: Perhaps we should merge this into the public-pr-merge.yml workflow, now that that exists. - name: Send Discord notification env: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} @@ -69,3 +70,22 @@ jobs: # Use `jq` to construct the json data blob in the format required by the webhook. data="$(jq --null-input --arg msg "$message" '.content=$msg')" curl -X POST -H 'Content-Type: application/json' -d "$data" "${DISCORD_WEBHOOK_URL}" + + invokePrivate: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + steps: + - name: Dispatch private merge workflow + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} + script: | + await github.rest.actions.createWorkflowDispatch({ + owner: 'clockworklabs', + repo: 'SpacetimeDBPrivate', + workflow_id: 'public-pr-merge.yml', + ref: 'bfops/smarter-internal-tests', + inputs: { + public_pr_number: String(context.payload.pull_request.number), + } + });