bump-sentry-in-getsentry.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: bump sentry in getsentry
  2. # Serializes the execution of this workflow.
  3. concurrency:
  4. group: ${{ github.workflow }}
  5. on:
  6. push:
  7. branches:
  8. - master
  9. jobs:
  10. bump-sentry:
  11. runs-on: ubuntu-20.04
  12. steps:
  13. - name: checkout
  14. uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 # v3
  15. with:
  16. # For getsentry/bin/bump-sentry, sentry needs to be at ../sentry relative to getsentry.
  17. path: sentry
  18. - name: checkout getsentry
  19. uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 # v3
  20. with:
  21. repository: 'getsentry/getsentry'
  22. path: getsentry
  23. # This PAT (Personal Access Token) belongs to getsentry-bot,
  24. # who can write to getsentry and is SAML+SSO ready.
  25. token: ${{ secrets.BUMP_SENTRY_TOKEN }}
  26. - name: install dependencies
  27. shell: bash
  28. run: |
  29. cd getsentry
  30. python -m pip install -q "$(grep '^pip-tools==' requirements-dev-frozen.txt)"
  31. - name: bump-sentry ${{ github.sha }}
  32. shell: bash
  33. run: |
  34. cd getsentry
  35. python -S -m bin.bump_sentry ${{ github.sha }}
  36. # If getsentry is pushed to by any other means while we were here,
  37. # we won't be able to push.
  38. for i in 1 2 3 4 5; do
  39. git push origin master && exit 0
  40. # There's a little bit of network delay here that suffices
  41. # as a small sleep.
  42. git pull --rebase origin master
  43. done
  44. # 5th and final attempt.
  45. git push origin master