cicd.yml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. name: Build and Distribute
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - release
  7. - master
  8. paths:
  9. - "**"
  10. workflow_dispatch:
  11. concurrency:
  12. group: ${{ github.head_ref || github.ref }}
  13. jobs:
  14. deb:
  15. name: 'DEB'
  16. permissions:
  17. id-token: write
  18. contents: read
  19. uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main
  20. strategy:
  21. # max-parallel: 1
  22. fail-fast: false
  23. matrix:
  24. os:
  25. - debian
  26. version:
  27. - bookworm
  28. - bullseye
  29. - buster
  30. platform:
  31. - name: amd64
  32. runner: ubuntu-latest
  33. - name: arm32v7
  34. runner: ubuntu-latest
  35. - name: arm64v8
  36. runner: ubuntu-latest
  37. # exclude:
  38. # - version: bookworm
  39. # platform:
  40. # name: arm32v7
  41. with:
  42. RUNNER: ${{ matrix.platform.runner }}
  43. ARTIFACTS_PATTERN: '.*\.(deb)$'
  44. DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
  45. MAINTAINER: 'Andrey Volk <andrey@signalwire.com>'
  46. META_FILE_PATH_PREFIX: /var/www/libks/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
  47. PLATFORM: ${{ matrix.platform.name }}
  48. # REPO_DOMAIN: freeswitch.signalwire.com
  49. TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact
  50. UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
  51. secrets:
  52. GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
  53. HOSTNAME: ${{ secrets.HOSTNAME }}
  54. PROXY_URL: ${{ secrets.PROXY_URL }}
  55. USERNAME: ${{ secrets.USERNAME }}
  56. TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
  57. # REPO_USERNAME: 'signalwire'
  58. # REPO_PASSWORD: ${{ secrets.REPOTOKEN }}
  59. rpm:
  60. name: 'RPM'
  61. permissions:
  62. id-token: write
  63. contents: read
  64. uses: signalwire/actions-template/.github/workflows/cicd-docker-build-and-distribute.yml@main
  65. strategy:
  66. # max-parallel: 1
  67. fail-fast: false
  68. matrix:
  69. os:
  70. - centos
  71. version:
  72. - 7
  73. platform:
  74. - name: amd64
  75. runner: ubuntu-latest
  76. with:
  77. RUNNER: ${{ matrix.platform.runner }}
  78. ARTIFACTS_PATTERN: '.*\.(rpm)$'
  79. DOCKERFILE: .github/docker/${{ matrix.os }}/${{ matrix.version }}/${{ matrix.platform.name }}/Dockerfile
  80. MAINTAINER: 'Andrey Volk <andrey@signalwire.com>'
  81. META_FILE_PATH_PREFIX: /var/www/libks/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}
  82. PLATFORM: ${{ matrix.platform.name }}
  83. # REPO_DOMAIN: freeswitch.signalwire.com
  84. TARGET_ARTIFACT_NAME: ${{ matrix.os }}-${{ matrix.version }}-${{ matrix.platform.name }}-artifact
  85. UPLOAD_BUILD_ARTIFACTS: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
  86. secrets:
  87. GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}
  88. HOSTNAME: ${{ secrets.HOSTNAME }}
  89. PROXY_URL: ${{ secrets.PROXY_URL }}
  90. USERNAME: ${{ secrets.USERNAME }}
  91. TELEPORT_TOKEN: ${{ secrets.TELEPORT_TOKEN }}
  92. # REPO_USERNAME: ${{ secrets.FSAUSER }}
  93. # REPO_PASSWORD: ${{ secrets.FSAPASS }}
  94. meta:
  95. name: 'Publish build data to meta-repo'
  96. if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.title, ':upload-artifacts') }}
  97. needs:
  98. - deb
  99. - rpm
  100. permissions:
  101. id-token: write
  102. contents: read
  103. uses: signalwire/actions-template/.github/workflows/meta-repo-content.yml@main
  104. with:
  105. META_CONTENT: '/var/www/libks/${{ github.ref_name }}/${{ github.run_id }}-${{ github.run_number }}'
  106. META_REPO: signalwire/bamboo_gha_trigger
  107. META_REPO_BRANCH: trigger/libks/${{ github.ref_name }}
  108. secrets:
  109. GH_BOT_DEPLOY_TOKEN: ${{ secrets.PAT }}