Skip to content

Commit

Permalink
Target specific repo in GH action app token (#8676)
Browse files Browse the repository at this point in the history
  • Loading branch information
flvndvd authored Nov 15, 2024
1 parent 43290bf commit 44b13ed
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/deploy-connectors-infra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,22 @@ jobs:
with:
app-id: ${{ secrets.INFRA_DISPATCH_APP_ID }}
private-key: ${{ secrets.INFRA_DISPATCH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: |
dust-infra
- name: Trigger dust-infra workflow
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 }}"
uses: actions/github-script@v6
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
await github.rest.repos.createDispatchEvent({
owner: ${{ github.repository_owner }},
repo: 'dust-infra',
event_type: 'trigger-component-deploy',
client_payload: {
us_central1: ${{ inputs.us-central1 }},
component: 'connectors',
image_tag: '${{ steps.short_sha.outputs.short_sha }}'
}
}'
});

0 comments on commit 44b13ed

Please sign in to comment.