File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed
Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update Rush Shrinkwrap
2+
3+ on :
4+ pull_request :
5+ types : [opened, synchronize, reopened]
6+ workflow_dispatch :
7+
8+ jobs :
9+ update-shrinkwrap :
10+ runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
13+ pull-requests : write
14+
15+ steps :
16+ - name : Checkout repository
17+ uses : actions/checkout@v6
18+ with :
19+ token : ${{ secrets.GITHUB_TOKEN }}
20+ ref : ${{ github.head_ref || github.ref_name }}
21+ fetch-depth : 0
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v6
25+ with :
26+ node-version : ' 20'
27+
28+ - name : Install Rush globally
29+ run : npm install -g @microsoft/rush
30+
31+ - name : Rush update
32+ run : rush update --full
33+
34+ - name : Check for changes
35+ id : check_changes
36+ run : |
37+ if git diff --quiet common/config/rush/npm-shrinkwrap.json; then
38+ echo "has_changes=false" >> $GITHUB_OUTPUT
39+ else
40+ echo "has_changes=true" >> $GITHUB_OUTPUT
41+ fi
42+
43+ - name : Commit and push changes
44+ if : steps.check_changes.outputs.has_changes == 'true'
45+ run : |
46+ git config user.name "github-actions[bot]"
47+ git config user.email "github-actions[bot]@users.noreply.github.com"
48+ git add common/config/rush/npm-shrinkwrap.json
49+ git commit -m "chore: update rush npm-shrinkwrap"
50+ git push
You can’t perform that action at this time.
0 commit comments