Skip to content

auto update #2531

auto update

auto update #2531

Workflow file for this run

name: auto update
on:
push:
branches: ['main']
schedule:
- cron: '0 * * * *'
jobs:
generate:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: install dependence
run: npm i -g pnpm && pnpm i --no-frozen-lockfile
- name: generate RSS and push notifacations
run: npm run rss
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
DING_TALK_BOT_TOKEN: ${{ secrets.DING_TALK_BOT_TOKEN }}
- name: update README
run: npx jtm run --watch false
- name: commit the all info
id: commit_msg
run: |
if git status -s | grep -q .; then
echo "Changes detected, committing..."
git status -s
echo "check_result=success" >> $GITHUB_OUTPUT
else
echo "No changes to commit"
exit 0
fi
git config --global user.email "eyelly.wu@gmail.com"
git config --global user.name "GitHub Workflow"
git add .
git commit -m 'chore: automatic update of GitHub workflow'
- name: git push
if: steps.commit_msg.outputs.check_result == 'success'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PUBLISH_TOKEN }}