Skip to content

Automated Workflow #13450

Automated Workflow

Automated Workflow #13450

Workflow file for this run

name: Automated Workflow
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions: write-all
jobs:
automate-task:
runs-on: self-hosted
container:
image: c4r50nz/selenium-chrome:v20230701
steps:
- name: Clone repository
run: |
rm -rf huma-rime
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/zhhmn/huma-rime
cd huma-rime
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
- name: Run script and capture output
id: script
run: |
cd huma-rime
python crawler.py >> $GITHUB_OUTPUT
- name: Commit and push if there are changes
run: |
cd huma-rime
git status
DATE=$(date +"%Y-%m-%d")
git add .
git commit --all --verbose -m "Automated update on $DATE" || exit 0
git tag ${{ steps.script.outputs.tag }}
git tag
git push --tags origin HEAD:master