⬆️ Bump rollup from 4.52.0 to 4.52.2 #117
Workflow file for this run
This file contains hidden or 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: Dedupe Yarn Dependencies | |
on: | |
pull_request_target: | |
types: [opened, synchronize] | |
branches: [main] | |
paths: | |
- 'yarn.lock' | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
dedupe: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
token: ${{ secrets.PAT }} | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v5 | |
with: | |
node-version-file: 'package.json' | |
cache: 'yarn' | |
- name: Install dependencies (immutable) | |
run: yarn install --immutable | |
- name: Dedupe | |
run: yarn dedupe | |
- name: Commit and push if yarn.lock changed | |
id: dedupe-check | |
run: | | |
git config user.name "ledermann-bot" | |
git config user.email "[email protected]" | |
if ! git diff --quiet; then | |
git add yarn.lock | |
git commit -m 'chore: yarn dedupe' | |
git push origin HEAD:${{ github.head_ref }} | |
echo "performed=true" >> $GITHUB_OUTPUT | |
else | |
echo "performed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Comment on PR - Dedupe performed | |
if: steps.dedupe-check.outputs.performed == 'true' | |
uses: actions/github-script@v8 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '🧹 **Yarn dedupe performed** - Duplicate dependencies have been removed from yarn.lock' | |
}) |