Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

51 linhas
1.5 KiB

  1. # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
  3. name: GitHub520
  4. on:
  5. push:
  6. schedule:
  7. - cron: '0 */2 * * *'
  8. jobs:
  9. build:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. python-version: [3.7]
  14. steps:
  15. - uses: actions/checkout@v2
  16. - name: Set up Python ${{ matrix.python-version }}
  17. uses: actions/setup-python@v2
  18. with:
  19. python-version: ${{ matrix.python-version }}
  20. - name: Install dependencies
  21. run: |
  22. python -m pip install --upgrade pip
  23. if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
  24. - name: update readme
  25. env:
  26. gitee_token: ${{ secrets.GITEE_TOKEN }}
  27. gitee_gist_id: ${{ secrets.GITEE_GIST_ID }}
  28. gitee_gist_file_name: ${{ secrets.GITEE_GIST_FILE_NAME }}
  29. run: |
  30. # fetch new ip content and update readme file
  31. python fetch_ips.py
  32. - name: commit
  33. id: commit
  34. run: |
  35. git config --global user.email sunxuebangong@gmail.com
  36. git config --global user.name action_bot
  37. git add .
  38. git commit -m "update readme content"
  39. continue-on-error: true
  40. - name: Check on failures
  41. if: steps.commit.outputs.status == 'failure'
  42. run: exit 1
  43. - name: Push changes
  44. uses: ad-m/github-push-action@master
  45. with:
  46. github_token: ${{ secrets.GITHUB_TOKEN }}