debian_packages.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: Debian Packages
  2. permissions: read-all
  3. on:
  4. workflow_dispatch:
  5. push:
  6. tags:
  7. - '[0-9]+.[0-9]+.[0-9]+'
  8. schedule:
  9. - cron: '0 0 * * 1,4' # Runs at 00:00 UTC on Monday and Thursday
  10. pull_request:
  11. branches: [ main ]
  12. paths:
  13. - 'packaging/debian/**' # Only run on changes to the debian packaging files
  14. jobs:
  15. test-packages:
  16. if: github.event_name == 'schedule' || github.event_name == 'pull_request'
  17. name: Test Packages
  18. runs-on: ubuntu-latest
  19. steps:
  20. - uses: actions/checkout@v5
  21. with:
  22. fetch-depth: 0
  23. - name: Set up QEMU
  24. uses: docker/setup-qemu-action@v3
  25. - name: Set up Docker Buildx
  26. uses: docker/setup-buildx-action@v3
  27. id: buildx
  28. with:
  29. install: true
  30. - name: Available Docker Platforms
  31. run: echo ${{ steps.buildx.outputs.platforms }}
  32. - name: Build Debian Packages
  33. run: make debian-packages
  34. - name: List generated files
  35. run: ls -l *.deb
  36. build-packages-manually:
  37. if: github.event_name == 'workflow_dispatch'
  38. name: Build Packages Manually
  39. runs-on: ubuntu-latest
  40. steps:
  41. - uses: actions/checkout@v5
  42. with:
  43. fetch-depth: 0
  44. - name: Set up QEMU
  45. uses: docker/setup-qemu-action@v3
  46. - name: Set up Docker Buildx
  47. uses: docker/setup-buildx-action@v3
  48. id: buildx
  49. with:
  50. install: true
  51. - name: Available Docker Platforms
  52. run: echo ${{ steps.buildx.outputs.platforms }}
  53. - name: Build Debian Packages
  54. run: make debian-packages
  55. - name: Upload package
  56. uses: actions/upload-artifact@v4
  57. with:
  58. name: packages
  59. path: "*.deb"
  60. if-no-files-found: error
  61. retention-days: 3
  62. publish-packages:
  63. if: github.event_name == 'push'
  64. name: Publish Packages
  65. runs-on: ubuntu-latest
  66. steps:
  67. - uses: actions/checkout@v5
  68. with:
  69. fetch-depth: 0
  70. - name: Set up QEMU
  71. uses: docker/setup-qemu-action@v3
  72. - name: Set up Docker Buildx
  73. uses: docker/setup-buildx-action@v3
  74. id: buildx
  75. with:
  76. install: true
  77. - name: Available Docker Platforms
  78. run: echo ${{ steps.buildx.outputs.platforms }}
  79. - name: Build Debian Packages
  80. run: make debian-packages
  81. - name: List generated files
  82. run: ls -l *.deb
  83. - name: Upload packages to repository
  84. env:
  85. FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
  86. run: for f in *.deb; do curl -F package=@$f https://$FURY_TOKEN@push.fury.io/miniflux/; done