Skip to content

Commit

Permalink
ci(dispatch-release-note): use Github Apps instead of GIHUB_TOKEN (#315)
Browse files Browse the repository at this point in the history
* ci(dispatch-release-note): use Github Apps instead of GIHUB_TOKEN

Signed-off-by: Shumpei Wakabayashi <[email protected]>

* fix typo

* chore: remove white space

Signed-off-by: Shumpei Wakabayashi <[email protected]>

---------

Signed-off-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
  • Loading branch information
2 people authored and tkimura4 committed Mar 15, 2023
1 parent 210f727 commit 42adf0f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/dispatch-release-note.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ jobs:
echo ::set-output name=ref-name::"$REF_NAME"
echo ::set-output name=tag-name::"${REF_NAME#beta/}"
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

- name: Repository dispatch for release note
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Authorization: token ${{ steps.generate-token.outputs.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/tier4/update-release-notes/dispatches" \
-d '{"event_type":"${{ steps.set-tag-name.outputs.ref-name }}"}'

0 comments on commit 42adf0f

Please sign in to comment.