Skip to content

Commit 06d8c5e

Browse files
Trying to fix auth error
1 parent dddca20 commit 06d8c5e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

action.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ inputs:
77
artifact-job:
88
description: "Name of the GitHub actions job where the artifact will be uploaded"
99
required: true
10-
github-token:
11-
description: "GitHub token available as the `secrets.GITHUB_TOKEN` variable"
12-
required: true
1310
runs:
1411
using: "composite"
1512
steps:
@@ -19,12 +16,12 @@ runs:
1916
env:
2017
PREVIEWER_URL: "${{ inputs.previewer-server }}/preview/${{ github.repository }}/${{ github.event.issue.number }}"
2118
ARTIFACT_JOB: ${{ inputs.artifact-job }}
22-
run: echo "previewer-response=$(curl -X POST -f --data-urlencode \"job=${JOB}\" ${PREVIEWER_URL})" >> "$GITHUB_OUTPUT"
19+
run: echo "previewer-response=$(curl -X POST -f --data-urlencode \"job=${ARTIFACT_JOB}\" ${PREVIEWER_URL})" >> "$GITHUB_OUTPUT"
2320
- name: "Add GitHub Comment"
2421
shell: bash
2522
env:
2623
ADD_COMMENT_URL: "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments"
27-
GITHUB_TOKEN: ${{ inputs.github_token }}
24+
GITHUB_TOKEN: ${{ github.token }}
2825
PREVIEWER_RESPONSE: ${{ steps.call-previewer.outputs.previewer-response }}
2926
run: |
30-
curl -H "Authorization: token ${GITHUB_TOKEN}" -d '{"body": "${{ env.PREVIEWER_RESPONSE }}"}' ${ADD_COMMENT_URL}
27+
curl -H "Authorization: Bearer ${GITHUB_TOKEN}" -d '{"body": "${{ env.PREVIEWER_RESPONSE }}"}' ${ADD_COMMENT_URL}

0 commit comments

Comments
 (0)