Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. ---
  2. name: CI
  3. permissions:
  4. actions: read
  5. checks: read
  6. contents: read
  7. deployments: read
  8. issues: read
  9. discussions: read
  10. pull-requests: read
  11. repository-projects: read
  12. security-events: read
  13. statuses: read
  14. on:
  15. push:
  16. tags:
  17. - v*
  18. branches:
  19. - master
  20. - stable
  21. - v1
  22. release:
  23. types:
  24. - published
  25. - released
  26. pull_request:
  27. types:
  28. - opened
  29. - edited
  30. - reopened
  31. - synchronize
  32. - ready_for_review
  33. jobs:
  34. test:
  35. name: Test
  36. runs-on: ubuntu-latest
  37. timeout-minutes: 10
  38. steps:
  39. - name: Checkout
  40. uses: actions/checkout@v6
  41. with:
  42. submodules: recursive
  43. - uses: jdx/mise-action@v3
  44. name: Install mise
  45. - name: Run tests
  46. run: mise tasks run covtest
  47. - name: Collect coverage
  48. uses: codecov/codecov-action@v5
  49. with:
  50. files: ./coverage.txt
  51. fuzz:
  52. name: Fuzzing
  53. runs-on: ubuntu-latest
  54. timeout-minutes: 20
  55. steps:
  56. - name: Checkout
  57. uses: actions/checkout@v6
  58. with:
  59. submodules: recursive
  60. - uses: jdx/mise-action@v3
  61. name: Install mise
  62. - name: Run fuzzing
  63. run: mise tasks run 'test:fuzz:*'
  64. lint:
  65. name: Lint
  66. runs-on: ubuntu-latest
  67. timeout-minutes: 5
  68. steps:
  69. - name: Checkout
  70. uses: actions/checkout@v6
  71. with:
  72. submodules: recursive
  73. - uses: jdx/mise-action@v3
  74. name: Install mise
  75. - name: Run linter
  76. run: mise tasks run lint
  77. docker:
  78. name: Docker
  79. runs-on: ubuntu-latest
  80. timeout-minutes: 20
  81. steps:
  82. - name: Checkout
  83. uses: actions/checkout@v6
  84. with:
  85. submodules: recursive
  86. - name: Get Docker meta
  87. id: meta
  88. uses: docker/metadata-action@v5
  89. with:
  90. images: |
  91. nineseconds/mtg
  92. ghcr.io/${{ github.repository }}
  93. tags: |
  94. type=semver,pattern={{version}}
  95. type=semver,pattern={{major}}.{{minor}}
  96. type=semver,pattern={{major}}
  97. type=raw,value=latest,enable={{is_default_branch}}
  98. type=raw,value=master,enable=${{ github.ref == 'refs/heads/master' }}
  99. type=raw,value=stable,enable=${{ github.ref == 'refs/heads/stable' }}
  100. - name: Setup QEMU
  101. uses: docker/setup-qemu-action@v3
  102. - name: Setup BuildX
  103. uses: docker/setup-buildx-action@v3
  104. - name: Setup cache
  105. uses: actions/cache@v5
  106. with:
  107. path: /tmp/buildx-cache
  108. key: ${{ runner.os }}-buildx-${{ github.sha }}
  109. restore-keys: |
  110. ${{ runner.os }}-buildx-
  111. - name: Login to DockerHub
  112. if: github.event_name != 'pull_request'
  113. uses: docker/login-action@v3
  114. with:
  115. username: ${{ secrets.DOCKERHUB_USERNAME }}
  116. password: ${{ secrets.DOCKERHUB_PASSWORD }}
  117. - name: Login to GitHub Container Registry
  118. if: github.event_name != 'pull_request'
  119. uses: docker/login-action@v3
  120. with:
  121. registry: ghcr.io
  122. username: ${{ github.actor }}
  123. password: ${{ secrets.GITHUB_TOKEN }}
  124. - name: Build and push
  125. uses: docker/build-push-action@v2
  126. with:
  127. pull: true
  128. context: .
  129. platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6
  130. push: ${{ github.event_name != 'pull_request' }}
  131. tags: ${{ steps.meta.outputs.tags }}
  132. labels: ${{ steps.meta.outputs.labels }}
  133. cache-from: type=local,src=/tmp/buildx-cache
  134. cache-to: type=local,dest=/tmp/buildx-cache