ant-design/.github/workflows/upgrade-deps.yml
dependabot[bot] 647603400a
chore(deps): bump peter-evans/create-pull-request from 5 to 6 (#47292)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 5 to 6.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v5...v6)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 22:04:01 +08:00

61 lines
1.7 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.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