update-deps.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. - name: Setup Go
  14. uses: actions/setup-go@v3
  15. with:
  16. go-version: "1.19"
  17. - name: Generate token
  18. id: generate_token
  19. uses: tibdex/github-app-token@v1
  20. with:
  21. app_id: ${{ secrets.APP_ID }}
  22. private_key: ${{ secrets.PRIVATE_KEY }}
  23. - uses: actions/checkout@v2
  24. with:
  25. token: ${{ steps.generate_token.outputs.token }}
  26. - name: create pull request
  27. run: |
  28. git config --global user.email "ExternalSecretsOperator@users.noreply.github.com"
  29. git config --global user.name "External Secrets Operator"
  30. BRANCH=update-deps-$(date "+%s")
  31. make update-deps
  32. git checkout -b $BRANCH
  33. git add -A
  34. git commit -m "update dependencies" -s
  35. git push origin $BRANCH
  36. gh pr create -B main -H ${BRANCH} --title 'chore: update dependencies' --body 'Created by Github action'
  37. env:
  38. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}