Skip to content

Merge remote-tracking branch 'I0o0/master' #11

Merge remote-tracking branch 'I0o0/master'

Merge remote-tracking branch 'I0o0/master' #11

Workflow file for this run

name: Auto update translator metadata
on:
push:
branches:
- master
- test
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# copy git 仓库到虚拟机上
- name: 'Checkout codes'
uses: actions/checkout@v3
- name: Git init
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git clean -f # Remove untrack file
- name: Update metadata
id: update_metadata
run: |
python metadata.py
- name: check update
id: modified
run: |
counts=`git status | grep "data/translators.json" | wc -l`
echo "counts=${counts}" >> $GITHUB_ENV
# - name: Update and mirror
# if: env.counts == 1
# run: |
# git status
# echo ${{ env.counts }}
# git add data/translators.json
# git commit -m 'update translator metadata'
# git push
# - uses: wearerequired/git-mirror-action@master #开源actions包
# env:
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# with:
# source-repo: "[email protected]:l0o0/translators_CN.git" # github仓库地址
# destination-repo: "[email protected]:goonback/translators_CN.git" # gitee仓库地址