Skip to content

data-robot

data-robot #590

Workflow file for this run

name: data-robot
on:
workflow_dispatch:
schedule:
# Beijing Time 20:00, daily, reference https://crontab.guru/ and https://datetime360.com/cn/utc-beijing-time/
- cron: "0 12 * * *"
jobs:
data-robot:
name: data-robot
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v1
- name: "Setup Node"
uses: actions/setup-node@v3
with:
node-version: 18
- name: "main"
env:
EXAMPLE: ${{ secrets.EXAMPLE }}
run: npm i --silent && npm run start
- name: "Update repo data"
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout $BRANCH_NAME
git remote set-url origin https://[email protected]/xianshenglu/github-release-history/
git fetch && git merge && git add .
git diff --quiet && git diff --staged --quiet || (git commit -m "ci: add release data" && git push)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PAT_BOT_RELEASE: ${{ secrets.PAT_BOT_RELEASE }}
BRANCH_NAME: ${{github.ref_name}}