diff --git a/.github/workflows/deploy-connectors-infra.yml b/.github/workflows/deploy-connectors-infra.yml index d3f4689d253f..d1951df46251 100644 --- a/.github/workflows/deploy-connectors-infra.yml +++ b/.github/workflows/deploy-connectors-infra.yml @@ -53,26 +53,19 @@ jobs: app-id: ${{ secrets.INFRA_DISPATCH_APP_ID }} private-key: ${{ secrets.INFRA_DISPATCH_APP_PRIVATE_KEY }} - - name: Use the token - env: - GH_TOKEN: ${{ steps.generate-token.outputs.token }} - run: | - gh api octocat - - name: Trigger dust-infra workflow - uses: actions/github-script@v7 - with: - github-token: ${{ steps.generate-token.outputs.token }} - script: | - await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: 'dust-infra', - event_type: 'trigger-component-deploy', - workflow_id: 'deploy.yaml', - ref: 'main', - client_payload: { - us_central1: ${{ inputs.us-central1 }}, - component: 'connectors', - image_tag: '${{ steps.short_sha.outputs.short_sha }}' + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/dust-tt/dust-infra/dispatches \ + -d '{ + "event_type": "trigger-component-deploy", + "client_payload": { + "us_central1": ${{ inputs.us-central1 }}, + "component": "connectors", + "image_tag": "${{ steps.short_sha.outputs.short_sha }}" } - }); + }' \ No newline at end of file