-
Notifications
You must be signed in to change notification settings - Fork 21
fix(run): pass gh token #61
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
Conversation
Adds the github token as env var for the run.sh script
|
closes #62 |
|
Hmm, does this override the custom GITHUB_TOKEN set in the action? If so, that's kinda bad. What I mean is: - name: Generate a changelog
uses: orhun/git-cliff-action@v4
env:
GITHUB_TOKEN: <custom-token>in that case, which GITHUB_TOKEN is being used? |
| shell: bash | ||
| run: ${GITHUB_ACTION_PATH}/run.sh --config=${{ inputs.config }} ${{ inputs.args }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ env.GITHUB_TOKEN || inputs.github_token }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
I’m not an expert in composite actions, and the docs are a bit vague on this subject.
But if they work like regular workflows, adding env.GITHUB_TOKEN || would make the env var on the ‘action’ step to use the env var of the ‘job’ step if supplied. Or use the input token if empty.
|
I think the new changes should give the appropriate behavior. |
|
@orhun have you had time to check my latest changes? |
orhun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, yeah, I'm counting on common sense and it should work as expected now.
Thanks for the PR!
|
No Pb, I was on vacation 😄 When can we expect the new release? |
|
Hopefully soon. I usually do it after I create a new release of |
Adds the github token as env var for the run.sh script