Skip to content

Clone and Process Repository #450

Clone and Process Repository

Clone and Process Repository #450

Workflow file for this run

name: Clone and Process Repository
on:
schedule:
- cron: '0 0 * * *' # 每天 UTC 时间 00:00 运行一次
jobs:
clone-and-process:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Clone Public Repository
run: |
git clone https://github.com/Anduin2017/HowToCook.git /tmp/target-repo
- name: Translation Files
run: |
ls ./json
chmod +x ./bin/HowToCook-json_linux_amd64_v1/HowToCook-json
./bin/HowToCook-json_linux_amd64_v1/HowToCook-json /tmp/target-repo/dishes ./json
ls ./json
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
if [[ $(git status --porcelain) ]]; then
git add ./json
git commit -m "Update translation files"
else
echo "No changes to commit"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}