Skip to content

Dependencies Automatic Update #1

Dependencies Automatic Update

Dependencies Automatic Update #1

Workflow file for this run

name: Dependencies Automatic Update
on:
workflow_dispatch:
jobs:
update-autogen-files:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4.0.1
- run: |
rm package-lock.json
npm i
- run: |
git switch -c autoupdate
gh auth setup-git
git config user.email "cicada1003@gmail.com"
git config user.name "auto-update bot"
git add .
if [[ $(git diff --cached) ]]
then
git commit -m"Dependencies Auto Update"
git push -u origin autoupdate
fi
PRS=$(gh pr list --json id -H autoupdate -s open)
if [ "$PRS" == '[]' ]
then
gh pr create --base master --fill
else
echo "$PRS"
fi