sync_from_gitee.yml 900 B

1234567891011121314151617181920212223242526
  1. name: sync_from_gitee
  2. on:
  3. workflow_dispatch:
  4. schedule:
  5. #ÿÌìÕâ¸öʱ¼ä¶¨Ê±Í¬²½
  6. - cron: '0 3 * * *'
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. with:
  13. persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
  14. fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
  15. - name: sync from gitee
  16. run: |
  17. git remote add gitee https://gitee.com/openLuat/luatos-soc-air105.git
  18. sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
  19. retry 'git pull gitee master'
  20. - name: Push changes
  21. uses: ad-m/github-push-action@master
  22. with:
  23. github_token: ${{ secrets.GITHUB_TOKEN }}
  24. branch: ${{ github.ref }}