Skip to content

Commit dfa564c

Browse files
authored
Change permissions and update token usage in workflow
1 parent 8d1c230 commit dfa564c

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/send-beta-build.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616
cancel-in-progress: false
1717

1818
permissions:
19-
contents: read
19+
contents: readwrite
2020

2121
jobs:
2222
build-and-dispatch:
@@ -68,19 +68,18 @@ jobs:
6868
6969
- name: Dispatch to beta repo
7070
run: |
71-
SUBFOLDER="${{ github.event.inputs.subfolder }}"
71+
SUBFOLDER="${{ github.event.inputs.subfolder || 'HTMLPlayerBeta' }}"
7272
ARTIFACT_URL="${{ steps.get-artifact.outputs.url }}"
73-
TOKEN="${{ secrets.GITHUB_TOKEN }}"
7473
curl -X POST \
75-
-H "Authorization: token ${TOKEN}" \
76-
-H "Accept: application/vnd.github.v3+json" \
74+
-H "Authorization: token ${{ secrets.BETA_PAT_TOKEN }}" \
75+
-H "Accept: application/vnd.github+json" \
7776
https://api.github.com/repos/HTMLToolkit/beta/dispatches \
7877
-d '{
7978
"event_type": "deploy-build",
8079
"client_payload": {
8180
"source_repo": "'${{ github.repository }}'",
8281
"artifact_url": "'${ARTIFACT_URL}'",
83-
"token": "'${TOKEN}'",
82+
"token": "'${{ secrets.GITHUB_TOKEN }}'",
8483
"subfolder": "'${SUBFOLDER}'"
8584
}
8685
}'

0 commit comments

Comments
 (0)