2023-11-03 22:12:46 +08:00
|
|
|
name: Upgrade Dependencies
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 18 * * *" # every day at 18:00 UTC
|
|
|
|
# - timezone: Asia/Shanghai # not supported yet https://github.com/orgs/community/discussions/13454
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
upgrade-deps:
|
|
|
|
runs-on: ubuntu-latest
|
2024-04-02 10:36:03 +08:00
|
|
|
if: github.repository == 'ant-design/ant-design' && github.ref == 'refs/heads/master'
|
2023-11-03 22:12:46 +08:00
|
|
|
permissions:
|
|
|
|
pull-requests: write # for peter-evans/create-pull-request to create PRs
|
|
|
|
contents: write # for git push
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
sparse-checkout: |
|
|
|
|
.github
|
|
|
|
.ncurc.js
|
|
|
|
package.json
|
|
|
|
|
2024-08-18 00:23:19 +08:00
|
|
|
- name: setup bun
|
|
|
|
uses: oven-sh/setup-bun@v2
|
2023-11-03 22:12:46 +08:00
|
|
|
|
|
|
|
- name: upgrade deps
|
|
|
|
id: upgrade
|
|
|
|
run: |
|
|
|
|
if [ ! -d .tmp ] ; then
|
|
|
|
mkdir .tmp
|
|
|
|
fi
|
2024-08-18 00:23:19 +08:00
|
|
|
$(bunx npm-check-updates -u > .tmp/upgrade-deps-logs.txt) 2>&1 || true
|
2023-11-03 22:12:46 +08:00
|
|
|
if [ -s .tmp/upgrade-deps-logs.txt ]; then
|
|
|
|
cat .tmp/upgrade-deps-logs.txt
|
|
|
|
echo "logs<<EOF" >> $GITHUB_OUTPUT
|
|
|
|
cat .tmp/upgrade-deps-logs.txt >> $GITHUB_OUTPUT
|
|
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: create pull request
|
|
|
|
id: cpr
|
2024-02-01 22:04:01 +08:00
|
|
|
uses: peter-evans/create-pull-request@v6
|
2023-11-03 22:12:46 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }} # Cannot be default!!!
|
|
|
|
assignees: 'afc163, zombieJ, xrkffgg, MadCcc'
|
|
|
|
title: "chore: upgrade deps"
|
|
|
|
commit-message: "chore: upgrade deps"
|
|
|
|
body: |
|
|
|
|
Upgrade dependencies
|
|
|
|
|
|
|
|
```
|
|
|
|
${{ steps.upgrade.outputs.logs }}
|
|
|
|
```
|
|
|
|
branch: auto-upgrade-deps
|
|
|
|
delete-branch: true
|
|
|
|
add-paths: |
|
|
|
|
package.json
|