update-deps.yml 720 B

123456789101112131415161718192021222324252627282930
  1. name: "Update dependencies"
  2. on:
  3. push:
  4. branches:
  5. - mj-auto-update-deps
  6. schedule:
  7. # Sunday, 1PM UTC
  8. - cron: "0 13 * * 0"
  9. jobs:
  10. stale:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Setup Go
  15. uses: actions/setup-go@v3
  16. with:
  17. go-version: "1.19"
  18. - name: create pull request
  19. run: |
  20. BRANCH=update-deps-$(date "+%s")
  21. touch example.foo
  22. # make update-deps
  23. git checkout -b $BRANCH
  24. git add -A
  25. git push origin $BRANCH
  26. gh pr create -B main -H ${BRANCH}- --title 'chore: update dependencies' -s --body 'Created by Github action'
  27. env:
  28. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}