python-app.yml 930 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. name: Python application
  2. on:
  3. push:
  4. schedule:
  5. - cron: '0 21 * * 1'
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: 检查分支
  11. uses: actions/checkout@v3
  12. - name: 安装 Python 3.10
  13. uses: actions/setup-python@v4
  14. with:
  15. python-version: 3.10.4
  16. - name: 安装模块
  17. run: |
  18. pip install requests
  19. pip install urllib3
  20. pip install pycryptodome
  21. - name: 生成json文件
  22. run: |
  23. export TZ='Asia/Shanghai'
  24. python autoUrl.py
  25. - name: 暂存提交
  26. run: |
  27. git config --global user.name 'hl128k'
  28. git config --global user.email 'hl128k@qq.com'
  29. export TZ='Asia/Shanghai'
  30. git add .
  31. git commit -m "update" -a
  32. - name: 推送
  33. uses: ad-m/github-push-action@master
  34. with:
  35. github_token: ${{ secrets.GITHUB_TOKEN }}