Skip to content

Commit 993809e

Browse files
authored
Update release.yml (#407)
swaps back to the old code for workflow_dispatch, but with GH_APPROVE_TOKEN
1 parent 114bf20 commit 993809e

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-
run: |
82-
curl -X POST \
83-
-H "Authorization: Bearer ${{ secrets.GH_MERGE_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"}'
81+
uses: benc-uk/workflow-dispatch@v1
82+
with:
83+
workflow: dist-pr.yml
84+
ref: 'temp-build-branch'
85+
token: ${{ secrets.GH_APPROVE_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

0 commit comments

Comments
 (0)