-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚗️ Run
pnpm dedupe
for Dependabot PRs
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deduplicate Dependabot PRs | ||
on: | ||
push: | ||
branches: | ||
- 'dependabot/npm_and_yarn/*' | ||
paths: | ||
- 'package.json' | ||
permissions: | ||
content: write | ||
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: Set up Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "49699333+dependabot[bot]@users.noreply.github.com" | ||
- name: Commit and push changes | ||
run: | | ||
git add pnpm-lock.yaml | ||
git commit -m "♻️ Deduplicate dependencies [dependabot skip]" || echo "No changes to commit" | ||
git push origin ${{ github.ref_name }} |