Skip to content

Commit

Permalink
Trying to fix auth error
Browse files Browse the repository at this point in the history
  • Loading branch information
datapythonista committed Jan 27, 2024
1 parent dddca20 commit 06d8c5e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
artifact-job:
description: "Name of the GitHub actions job where the artifact will be uploaded"
required: true
github-token:
description: "GitHub token available as the `secrets.GITHUB_TOKEN` variable"
required: true
runs:
using: "composite"
steps:
Expand All @@ -19,12 +16,12 @@ runs:
env:
PREVIEWER_URL: "${{ inputs.previewer-server }}/preview/${{ github.repository }}/${{ github.event.issue.number }}"
ARTIFACT_JOB: ${{ inputs.artifact-job }}
run: echo "previewer-response=$(curl -X POST -f --data-urlencode \"job=${JOB}\" ${PREVIEWER_URL})" >> "$GITHUB_OUTPUT"
run: echo "previewer-response=$(curl -X POST -f --data-urlencode \"job=${ARTIFACT_JOB}\" ${PREVIEWER_URL})" >> "$GITHUB_OUTPUT"
- name: "Add GitHub Comment"
shell: bash
env:
ADD_COMMENT_URL: "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments"
GITHUB_TOKEN: ${{ inputs.github_token }}
GITHUB_TOKEN: ${{ github.token }}
PREVIEWER_RESPONSE: ${{ steps.call-previewer.outputs.previewer-response }}
run: |
curl -H "Authorization: token ${GITHUB_TOKEN}" -d '{"body": "${{ env.PREVIEWER_RESPONSE }}"}' ${ADD_COMMENT_URL}
curl -H "Authorization: Bearer ${GITHUB_TOKEN}" -d '{"body": "${{ env.PREVIEWER_RESPONSE }}"}' ${ADD_COMMENT_URL}

0 comments on commit 06d8c5e

Please sign in to comment.