mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-03 00:09:39 +08:00
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
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
|
|
if: github.repository == 'ant-design/ant-design' && github.ref == 'refs/heads/master'
|
|
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
|
|
|
|
- name: setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: upgrade deps
|
|
id: upgrade
|
|
run: |
|
|
if [ ! -d .tmp ] ; then
|
|
mkdir .tmp
|
|
fi
|
|
$(npx npm-check-updates -u > .tmp/upgrade-deps-logs.txt) 2>&1 || true
|
|
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
|
|
uses: peter-evans/create-pull-request@v6
|
|
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
|