debian_packages.yml 3.3 KB

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