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

ci(dispatch-release-note): use PAT instead of GITHUB_TOKEN #314

Closed
wants to merge 1 commit into from

Conversation

shmpwk
Copy link
Collaborator

@shmpwk shmpwk commented Mar 11, 2023

Description

We mostly cannot dispatch workflow with GITHUB_TOKEN.
Instead, we often use personal access token (PAT).

Recently, Github announced that we can do it with GITHUB_TOKEN
https://github.blog/changelog/2022-09-08-github-actions-use-github_token-with-workflow_dispatch-and-repository_dispatch/
However it is limited as I understand.
actions/github-script#351

Thus I want to use PAT now.

If we use PAT, I want reviewer to register PAT as Actions Secrets.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Shumpei Wakabayashi <shumpei.wakabayashi@tier4.jp>
@github-actions github-actions bot added the ci label Mar 11, 2023
@@ -33,7 +33,7 @@ jobs:
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Authorization: Bearer ${{ secrets.PAT }}" \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using GitHub App?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Github Apps is more convinient for organization secrets rather than presonal secrets.
Let me try Github Apps.

@shmpwk
Copy link
Collaborator Author

shmpwk commented Mar 13, 2023

Close this PR since it is better to use Github Apps rather than PAT.
That is implemented in #315

@shmpwk shmpwk closed this Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants