mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
DEV: Run pnpm dedupe
on Dependabot PRs (#30950)
This commit is contained in:
parent
c0fdb2f33d
commit
7dcae416ad
45
.github/workflows/dependabot-pnpm-dedupe.yml
vendored
Normal file
45
.github/workflows/dependabot-pnpm-dedupe.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
name: Pnpm dedupe on Dependabot PRs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "dependabot/npm_and_yarn/*"
|
||||
paths:
|
||||
- "pnpm-lock.yaml"
|
||||
|
||||
jobs:
|
||||
deduplicate:
|
||||
name: Deduplicate
|
||||
if: github.actor == 'dependabot[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Set working directory owner
|
||||
run: chown root:root .
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: pnpm install
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- run: pnpm dedupe
|
||||
|
||||
- name: Git push
|
||||
run: |
|
||||
git config --global user.email "ci@ci.invalid"
|
||||
git config --global user.name "Discourse CI"
|
||||
git add pnpm-lock.yaml
|
||||
git status
|
||||
git commit -m "pnpm dedupe [dependabot skip]" && git push origin "HEAD:${GITHUB_HEAD_REF}"
|
Loading…
x
Reference in New Issue
Block a user