Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/update-rush-shrinkwrap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update Rush Shrinkwrap

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
update-shrinkwrap:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'

- name: Rush update
run: node common/scripts/install-run-rush.js update --full

- name: Check for changes
id: check_changes
run: |
if git diff --quiet common/config/rush/npm-shrinkwrap.json; then
echo "has_changes=false" >> $GITHUB_OUTPUT
else
echo "has_changes=true" >> $GITHUB_OUTPUT
fi

- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add common/config/rush/npm-shrinkwrap.json
git commit -m "chore: update rush npm-shrinkwrap"
git push
Loading