chore(deps): update devdependency undici to v7 #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update pnpm Lockfile | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
update-lockfile: | |
name: Update pnpm Lockfile | |
if: | | |
github.event.issue.pull_request && | |
contains(github.event.comment.body, '!lock') && | |
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Generate GitHub App token | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Get PR details | |
id: pr | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ steps.app-token.outputs.token }} | |
script: | | |
const { owner, repo } = context.repo; | |
const prNumber = context.issue.number; | |
const pr = await github.rest.pulls.get({ | |
owner, | |
repo, | |
pull_number: prNumber, | |
}); | |
return { | |
ref: pr.data.head.ref, | |
sha: pr.data.head.sha, | |
repo: pr.data.head.repo.full_name, | |
}; | |
- name: Checkout PR branch | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
ref: ${{ fromJSON(steps.pr.outputs.result).ref }} | |
repository: ${{ fromJSON(steps.pr.outputs.result).repo }} | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
cache: 'pnpm' | |
- name: Update lockfile | |
run: | | |
pnpm install --lockfile-only | |
- name: Commit updated lockfile | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: update pnpm lockfile" | |
file_pattern: "pnpm-lock.yaml" | |
skip_dirty_check: false | |
skip_fetch: true |