bump-sentry-in-getsentry.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. defaults:
  10. run:
  11. # the default default is:
  12. # bash --noprofile --norc -eo pipefail {0}
  13. shell: bash --noprofile --norc -eo pipefail -ux {0}
  14. jobs:
  15. bump-sentry:
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - name: checkout
  19. uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  20. with:
  21. # For getsentry/bin/bump-sentry, sentry needs to be at ../sentry relative to getsentry.
  22. path: sentry
  23. - name: checkout getsentry
  24. uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
  25. with:
  26. repository: 'getsentry/getsentry'
  27. path: getsentry
  28. # This PAT (Personal Access Token) belongs to getsentry-bot,
  29. # who can write to getsentry and is SAML+SSO ready.
  30. token: ${{ secrets.BUMP_SENTRY_TOKEN }}
  31. - name: bump-sentry ${{ github.sha }}
  32. run: |
  33. cd getsentry
  34. python -S -m bin.bump_sentry ${{ github.sha }}
  35. # If getsentry is pushed to by any other means while we were here,
  36. # we won't be able to push.
  37. for i in 1 2 3 4 5; do
  38. git push origin master && exit 0
  39. # There's a little bit of network delay here that suffices
  40. # as a small sleep.
  41. git pull --rebase origin master
  42. done
  43. # 5th and final attempt.
  44. git push origin master