Skip to content

Automatic updating of srs files #28

Automatic updating of srs files

Automatic updating of srs files #28

Workflow file for this run

name: Automatic updating of srs files
on:
schedule:
- cron: '0 18 */3 * *' # 每3天的 UTC+8 2:00 (即 UTC 18:00)
workflow_dispatch: # 允许手动触发
push:
paths:
- 'tools/**' # 仅在 tools 目录有变化时触发
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
echo $CONDA/bin >> $GITHUB_PATH
- name: Change directory to tools and run scripts
run: |
cd tools
python list_json.py
bash convert2srs.sh
- name: Commit changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
if [ -n "$(git status --porcelain)" ]; then
git add tools/temp_rules/
git add tools/srs/
git commit -m 'Add downloaded files to temp_rules and srs'
git push
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}