Skip to content

Commit 92f20c1

Browse files
authored
Update release.yml (#403)
Updates workflow dispatch to use the GH_APPROVE_TOKEN; uses the pattern set forth in the GitHub docs to do so.
1 parent 5f81362 commit 92f20c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
git push --force origin temp-build-branch
7979
8080
- name: Trigger Create Release Workflow
81-
uses: benc-uk/workflow-dispatch@v1
82-
with:
83-
workflow: dist-pr.yml
84-
ref: 'temp-build-branch'
85-
token: ${{ secrets.GH_MERGE_TOKEN }} # Use the same token that pushed, it needs 'workflows: write' permissions
86-
inputs: '{ "source_run_id": "${{ github.run_id }}" }' # Optional: Pass the run ID for traceability
81+
run: |
82+
curl -X POST \
83+
-H "Authorization: Bearer ${{ secrets.GH_APPROVE_TOKEN }}" \
84+
-H "Accept: application/vnd.github.v3+json" \
85+
https://api.github.com/repos/googlemaps-samples/js-api-samples/actions/workflows/dist-pr.yml/dispatches \
86+
-d '{"ref":"main"}'

0 commit comments

Comments
 (0)