Skip to content

Check TMDB IP

Check TMDB IP #160

Workflow file for this run

name: Check TMDB IP
on:
workflow_dispatch:
schedule:
- cron: '0 10,22 * * *' # 每天 10:00 和 22:00 执行
permissions:
contents: write # 确保有写入权限
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt update
sudo apt install --only-upgrade python3-pip
if [ -f requirements.txt ]; then sudo pip install -r requirements.txt; fi
- name: Run Python script
run: |
sudo python check_tmdb_github.py
- name: 提交更改
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add README.md Tmdb_host_ipv4 Tmdb_host_ipv6
git commit -m "Update TMDB IP [action]" || echo "No changes to commit"
continue-on-error: true
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push origin main