Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actions fails unless GITHUB_TOKEN is explicitly provided #92

Open
manio143 opened this issue Nov 17, 2024 · 1 comment
Open

Actions fails unless GITHUB_TOKEN is explicitly provided #92

manio143 opened this issue Nov 17, 2024 · 1 comment

Comments

@manio143
Copy link

manio143 commented Nov 17, 2024

I've a good hour trying to debug why the action was failing for my repo. Turns out the GITHUB_TOKEN value was blank.
By default the action uses github.token which is empty. Instead secrets.GITHUB_TOKEN needs to be used.

GITHUB_TOKEN:
description: 'GitHub token needed to interact with the repository'
required: false
default: ${{ github.token }}

Also would be good to check for that in the script, because it runs all the way, but jq fails to parse response from GitHub API when it's not in an expected format. It fails but the script isn't aware why and doesn't print anything that could point to an authorization issue.

Work around:

steps:
- uses: codelytv/pr-size-labeler@v1
  with:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount).
🕵️‍♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know!
🙌 And when they open the PR, they can comment /claim #92 either in the PR description or in a PR's comment.

🪙 Also, everyone can tip any user commenting /tip 20 @manio143 (replace 20 with the amount, and @manio143 with the user to tip).

📖 If you want to learn more, check out our documentation.
@carlos-mg89
Copy link

Not working for me, still getting this error:

/src/main.sh: line 14: /root/bin/docpars: cannot execute binary file: Exec format error
/src/main.sh: line 19: github_token: unbound variable

Could anyone help? I've used previously GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} in other GitHub Actions, but not on this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants