Skip to content

Commit

Permalink
👷 Run pnpm dedupe for Dependabot PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
mingjunlu committed Feb 6, 2024
1 parent 20cf933 commit d93ac2a
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-dedupe.yaml
@@ -0,0 +1,34 @@
name: Deduplicate Dependabot PRs
on:
push:
branches:
- "dependabot/npm_and_yarn/*"
paths:
- "package.json"
jobs:
dedupe:
name: Deduplicate dependencies
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Deduplicate dependencies
run: pnpm dedupe
- name: Commit and push changes
run: |
git config user.name "github-actions[bot]"
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add yarn.lock
git commit -m "♻️ Deduplicate dependencies [dependabot skip]" || echo "No changes to commit"
git push origin "HEAD:${GITHUB_HEAD_REF}"

0 comments on commit d93ac2a

Please sign in to comment.