Skip to content

Commit

Permalink
Use vim-jp bot app when running depup
Browse files Browse the repository at this point in the history
CI jobs for depup were not automatically executed because we used
GITHUB_TOKEN.
To work around the restriction of GITHUB_TOKEN, use
action/create-github-app-token to generate a token.

See:
* https://zenn.dev/suzutan/articles/how-to-use-github-apps-token-in-github-actions
* https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions
* https://github.com/marketplace/actions/create-github-app-token
* vim-jp/vimdoc-ja-working#1610
  • Loading branch information
k-takata committed Jul 13, 2024
1 parent 969a97c commit 213fba3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/depup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ jobs:
version_name: REVIEWDOG_VERSION
repo: reviewdog/reviewdog

- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.VIM_JP_BOT_APP_ID }}
private-key: ${{ secrets.VIM_JP_BOT_PRIVATE_KEY }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ steps.app-token.outputs.token }}
author: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>'
title: "chore(deps): update ${{ steps.depup.outputs.repo }} to ${{ steps.depup.outputs.latest }}"
commit-message: "chore(deps): update ${{ steps.depup.outputs.repo }} to ${{ steps.depup.outputs.latest }}"
Expand Down

0 comments on commit 213fba3

Please sign in to comment.