Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PilaScat/Threadfin
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: marcelGoerentz/Threadfin
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: development
Choose a head ref
Able to merge. These branches can be automatically merged.

Commits on Aug 9, 2024

  1. Copy the full SHA
    4a03c35 View commit details
  2. Fix Dockerfile

    marcelGoerentz committed Aug 9, 2024
    Copy the full SHA
    f09dd84 View commit details

Commits on Aug 11, 2024

  1. Copy the full SHA
    b3f8d4d View commit details

Commits on Aug 13, 2024

  1. Sync with origin project (marcelGoerentz#17)

    * Sync with original project
    
    * Fix Dockerfile
    
    * Fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
    * Fix streaming bug
    
    * Fix bug where counter was not correct displayed
    
    * Update version so a new beta will be released
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Trigger beta release
    marcelGoerentz authored Aug 13, 2024
    Copy the full SHA
    feb02f6 View commit details
  2. Update threadfin.go

    marcelGoerentz authored Aug 13, 2024
    Copy the full SHA
    770af8a View commit details

Commits on Aug 15, 2024

  1. Fix banner bug

    marcelGoerentz committed Aug 15, 2024
    Copy the full SHA
    e1d7b74 View commit details

Commits on Aug 16, 2024

  1. Fix banner bug

    marcelGoerentz committed Aug 16, 2024
    Copy the full SHA
    bb55069 View commit details
  2. Update yml files

    marcelGoerentz committed Aug 16, 2024
    Copy the full SHA
    b676e0e View commit details

Commits on Aug 17, 2024

  1. Kill all left behinds processes (marcelGoerentz#20)

    * Feature/save and kill processes (marcelGoerentz#18)
    
    * Update threadfin.go
    
    * Fix banner bug
    marcelGoerentz authored Aug 17, 2024
    Copy the full SHA
    bf11e6a View commit details

Commits on Aug 19, 2024

  1. Fix streaming bug + fix bug where wrong DVR IP was used + remove iout…

    …il package completely + fix bug where wrong argument has been passed to ffmpeg
    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    c02cb8a View commit details
  2. Copy the full SHA
    9ceaa50 View commit details
  3. Copy the full SHA
    476c110 View commit details
  4. Feature/save and kill processes (marcelGoerentz#18)

    * Save started processes to file and kill them at the next start
    
    * Update threadfin.go
    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    e066006 View commit details
  5. Sync with origin project (marcelGoerentz#17)

    * Sync with original project
    
    * Fix Dockerfile
    
    * Fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
    * Fix streaming bug
    
    * Fix bug where counter was not correct displayed
    
    * Update version so a new beta will be released
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Trigger beta release
    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    bfd4306 View commit details
  6. Fix banner bug

    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    f26f10a View commit details
  7. Kill all left behinds processes (marcelGoerentz#20)

    * Feature/save and kill processes (marcelGoerentz#18)
    
    * Update threadfin.go
    
    * Fix banner bug
    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    32f3a48 View commit details
  8. Fix playlist counter bug

    Update threadfin.go
    marcelGoerentz committed Aug 19, 2024
    Copy the full SHA
    f7dea02 View commit details
  9. Copy the full SHA
    dbd55f2 View commit details

Commits on Aug 21, 2024

  1. Fix RAM bug

    marcelGoerentz committed Aug 21, 2024
    Copy the full SHA
    b04d3a8 View commit details
  2. Update buffer.go

    marcelGoerentz authored Aug 21, 2024
    Copy the full SHA
    6517934 View commit details

Commits on Aug 22, 2024

  1. Fix ram bug (marcelGoerentz#26)

    * Update buffer.go
    
    * Update threadfin.go
    marcelGoerentz authored Aug 22, 2024
    Copy the full SHA
    c575eb0 View commit details
  2. Fix ram usage (marcelGoerentz#27)

    * Update threadfin.go
    
    * Fixed docker link on README (marcelGoerentz#16)
    
    * Sync with origin project (marcelGoerentz#17)
    
    * Sync with original project
    
    * Fix Dockerfile
    
    * Fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
    * Fix streaming bug
    
    * Fix bug where counter was not correct displayed
    
    * Update version so a new beta will be released
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Fix Dockerfile so beta realease will be from beta branch
    
    * Trigger beta release
    
    * Update threadfin.go
    
    * Fix banner bug
    
    * Fix banner bug
    
    * Update yml files
    
    * Kill all left behinds processes (marcelGoerentz#20)
    
    
    * Feature/save and kill processes (marcelGoerentz#18)
    
    * Update threadfin.go
    
    * Fix banner bug
    
    * Fix playlist counter bug
    
    * Fix RAM bug
    
    * Update buffer.go
    
    * Update buffer.go
    
    * Update threadfin.go
    
    ---------
    
    Co-authored-by: Filippo Scatigna <fili.2000@live.it>
    marcelGoerentz and PilaScat authored Aug 22, 2024
    Copy the full SHA
    3d1abf8 View commit details
  3. Update buffer.go

    marcelGoerentz authored Aug 22, 2024
    Copy the full SHA
    ae098bf View commit details
  4. Update buffer.go

    marcelGoerentz authored Aug 22, 2024
    Copy the full SHA
    72cbbdb View commit details
  5. Update threadfin.go

    marcelGoerentz authored Aug 22, 2024
    Copy the full SHA
    a5a8755 View commit details
  6. Update buffer.go

    marcelGoerentz authored Aug 22, 2024
    Copy the full SHA
    5dffe16 View commit details

Commits on Aug 24, 2024

  1. First version of new listeningIP option (marcelGoerentz#29)

    * Initial commit
    
    * First running version
    
    * Update version
    marcelGoerentz authored Aug 24, 2024
    Copy the full SHA
    9882637 View commit details

Commits on Aug 26, 2024

  1. Add feature to select binding IPs (marcelGoerentz#30)

    * Add functions to update, cancel and close button and finalize the feature. Update note texts
    
    * Add update button
    
    * Fix bug where only ; will be shown when no IP has been selected
    marcelGoerentz authored Aug 26, 2024
    Copy the full SHA
    d2ff15a View commit details
  2. Copy the full SHA
    d816140 View commit details

Commits on Aug 27, 2024

  1. Squashed commit of the following:

    commit d816140
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Mon Aug 26 11:57:33 2024 +0200
    
        Fix Dockerfile, Fix minor bugs in initializing phase
    
    commit d2ff15a
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Mon Aug 26 08:44:22 2024 +0200
    
        Add feature to select binding IPs (marcelGoerentz#30)
    
        * Add functions to update, cancel and close button and finalize the feature. Update note texts
    
        * Add update button
    
        * Fix bug where only ; will be shown when no IP has been selected
    
    commit 9882637
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Sun Aug 25 00:26:16 2024 +0200
    
        First version of new listeningIP option (marcelGoerentz#29)
    
        * Initial commit
    
        * First running version
    
        * Update version
    
    commit a5a8755
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Thu Aug 22 23:43:45 2024 +0200
    
        Update threadfin.go
    
    commit 72cbbdb
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Thu Aug 22 23:42:41 2024 +0200
    
        Update buffer.go
    
    commit 3d1abf8
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Thu Aug 22 23:37:56 2024 +0200
    
        Fix ram usage (marcelGoerentz#27)
    
        * Update threadfin.go
    
        * Fixed docker link on README (marcelGoerentz#16)
    
        * Sync with origin project (marcelGoerentz#17)
    
        * Sync with original project
    
        * Fix Dockerfile
    
        * Fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
        * Fix streaming bug
    
        * Fix bug where counter was not correct displayed
    
        * Update version so a new beta will be released
    
        * Fix Dockerfile so beta realease will be from beta branch
    
        * Fix Dockerfile so beta realease will be from beta branch
    
        * Trigger beta release
    
        * Update threadfin.go
    
        * Fix banner bug
    
        * Fix banner bug
    
        * Update yml files
    
        * Kill all left behinds processes (marcelGoerentz#20)
    
        * Feature/save and kill processes (marcelGoerentz#18)
    
        * Update threadfin.go
    
        * Fix banner bug
    
        * Fix playlist counter bug
    
        * Fix RAM bug
    
        * Update buffer.go
    
        * Update buffer.go
    
        * Update threadfin.go
    
        ---------
    
        Co-authored-by: Filippo Scatigna <fili.2000@live.it>
    
    commit f7dea02
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Mon Aug 19 22:33:38 2024 +0200
    
        Fix playlist counter bug
    
        Update threadfin.go
    
    commit 32f3a48
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Sat Aug 17 13:09:47 2024 +0200
    
        Kill all left behinds processes (marcelGoerentz#20)
    
        * Feature/save and kill processes (marcelGoerentz#18)
    
        * Update threadfin.go
    
        * Fix banner bug
    
    commit f26f10a
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Thu Aug 15 11:33:58 2024 +0200
    
        Fix banner bug
    
    commit bfd4306
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Tue Aug 13 22:00:14 2024 +0200
    
        Sync with origin project (marcelGoerentz#17)
    
        * Sync with original project
    
        * Fix Dockerfile
    
        * Fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
        * Fix streaming bug
    
        * Fix bug where counter was not correct displayed
    
        * Update version so a new beta will be released
    
        * Fix Dockerfile so beta realease will be from beta branch
    
        * Fix Dockerfile so beta realease will be from beta branch
    
        * Trigger beta release
    
    commit e066006
    Author: Marcel Goerentz <57457529+marcelGoerentz@users.noreply.github.com>
    Date:   Wed Aug 14 22:22:35 2024 +0200
    
        Feature/save and kill processes (marcelGoerentz#18)
    
        * Save started processes to file and kill them at the next start
    
        * Update threadfin.go
    
    commit 476c110
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Tue Aug 13 11:19:01 2024 +0200
    
        Fix bug where counter was not correct displayed
    
    commit 9ceaa50
    Author: Filippo Scatigna <fili.2000@live.it>
    Date:   Sun Aug 11 22:32:34 2024 +0200
    
        Fixed docker link on README (marcelGoerentz#16)
    
    commit c02cb8a
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Tue Aug 13 07:12:07 2024 +0200
    
        Fix streaming bug + fix bug where wrong DVR IP was used + remove ioutil package completely + fix bug where wrong argument has been passed to ffmpeg
    
    commit f09dd84
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Fri Aug 9 23:59:35 2024 +0200
    
        Fix Dockerfile
    
    commit 4a03c35
    Author: Marcel Goerentz <m.goerentz@t-online.de>
    Date:   Fri Aug 9 23:41:56 2024 +0200
    
        Sync with original project
    marcelGoerentz committed Aug 27, 2024
    Copy the full SHA
    cf3b793 View commit details
  2. Copy the full SHA
    21f8cf3 View commit details

Commits on Aug 28, 2024

  1. Copy the full SHA
    4e11c61 View commit details
  2. Customize no more streams video (marcelGoerentz#31)

    * Add function to place image within config folder to generate the no-more-streams video
    
    * Implement a dynamic dialogue for IP Bindings
    
    * Add user interface to upload custom image
    marcelGoerentz authored Aug 28, 2024
    Copy the full SHA
    afc4d6c View commit details
  3. Copy the full SHA
    6c2935f View commit details
  4. Fix webUI

    marcelGoerentz committed Aug 28, 2024
    Copy the full SHA
    024f129 View commit details
  5. Support mobile devices

    marcelGoerentz committed Aug 28, 2024
    Copy the full SHA
    bf24ae2 View commit details

Commits on Aug 29, 2024

  1. Copy the full SHA
    83bb6e8 View commit details

Commits on Sep 9, 2024

  1. Copy the full SHA
    5824734 View commit details

Commits on Sep 12, 2024

  1. Squash merge from beta

    marcelGoerentz committed Sep 12, 2024
    Copy the full SHA
    e0e690c View commit details

Commits on Sep 15, 2024

  1. Extend API (marcelGoerentz#32)

    * Initial commit
    
    * Rework web client
    
    * Update web client
    
    * Fix bug where customized video was not created
    
    * Fix bug where customized video was not created
    
    * Update web client and finish feature
    
    * Update buffer.go
    
    * Update Dockerfile
    marcelGoerentz authored Sep 15, 2024
    Copy the full SHA
    236ad95 View commit details

Commits on Oct 17, 2024

  1. Fix Dockerfile

    marcelGoerentz committed Oct 17, 2024
    Copy the full SHA
    1614acc View commit details
  2. Fix ENTRYPOINT

    marcelGoerentz committed Oct 17, 2024
    Copy the full SHA
    4e45823 View commit details
  3. Copy the full SHA
    8690e7c View commit details

Commits on Nov 6, 2024

  1. Merge beta

    marcelGoerentz committed Nov 6, 2024
    Copy the full SHA
    79a568d View commit details
  2. Update beta branch

    marcelGoerentz committed Nov 6, 2024
    Copy the full SHA
    4bdc5bc View commit details
  3. Fix Dockerfile

    marcelGoerentz committed Nov 6, 2024
    Copy the full SHA
    70be3a4 View commit details
  4. Copy the full SHA
    1d471cf View commit details

Commits on Nov 7, 2024

  1. Copy the full SHA
    f3a3286 View commit details
  2. Update beta branch

    marcelGoerentz committed Nov 7, 2024
    Copy the full SHA
    e77866f View commit details
  3. Bugfix terminating streams and possible fix for counter error, unkill…

    …ed processes and RAM eating
    marcelGoerentz committed Nov 7, 2024
    Copy the full SHA
    510c62d View commit details
Showing with 6,928 additions and 5,071 deletions.
  1. +49 −10 .github/workflows/beta.yml
  2. +114 −0 .github/workflows/manual.yml
  3. +52 −12 .github/workflows/release.yml
  4. +2 −0 .gitignore
  5. +47 −53 Dockerfile
  6. +129 −58 README.md
  7. +61 −2 Utility/create_binaries.sh
  8. +48 −0 Utility/create_new_webUI.py
  9. +32 −0 Utility/set_build_number.sh
  10. +8 −0 Utility/update_build_number_variable.sh
  11. +6 −7 go.mod
  12. +10 −8 go.sum
  13. BIN html/img/BC-QR.png
  14. +0 −141 html/index.html
  15. +4 −5 package-lock.json
  16. +1 −1 package.json
  17. BIN {html/img → resources/images}/stream-limit.jpg
  18. +6 −0 resources/readme.txt
  19. BIN {html → resources}/video/stream-limit.ts
  20. +9 −10 src/backup.go
  21. +22 −0 src/buffer-interface.go
  22. +302 −1,220 src/buffer.go
  23. +1 −1 src/compression.go
  24. +34 −43 src/config.go
  25. +43 −28 src/data.go
  26. +3 −4 src/html-build.go
  27. +16 −16 src/images.go
  28. +1 −1 src/info.go
  29. +2 −3 src/internal/authentication/authentication.go
  30. +13 −18 src/internal/imgcache/imagecache.go
  31. +6 −6 src/internal/m3u-parser/m3u-parser_test.go
  32. +0 −136 src/internal/up2date/client/client.go
  33. +0 −265 src/internal/up2date/client/update.go
  34. +92 −0 src/internal/updater/checkSigning.go
  35. +352 −0 src/internal/updater/updater.go
  36. +3 −1 src/m3u.go
  37. +3 −4 src/maintenance.go
  38. +75 −17 src/provider.go
  39. +59 −11 src/screen.go
  40. +47 −47 src/ssdp.go
  41. +270 −0 src/stream.go
  42. +490 −0 src/streamManager.go
  43. +0 −257 src/struct-buffer.go
  44. +46 −46 src/struct-system.go
  45. +68 −28 src/struct-webserver.go
  46. +68 −26 src/struct-xml.go
  47. +42 −18 src/system.go
  48. +268 −0 src/thirdPartyBuffer.go
  49. +108 −0 src/threadfinBuffer.go
  50. +51 −67 src/toolchain.go
  51. +34 −343 src/update.go
  52. +43 −39 src/webUI.go
  53. +403 −202 src/webserver.go
  54. +193 −215 src/xepg.go
  55. +191 −30 threadfin.go
  56. +9 −0 threadfin_pubkey.pem
  57. +0 −46 ts/banner.ts
  58. +0 −3 ts/compileJS.sh
  59. +0 −177 ts/configuration_ts.ts
  60. +0 −65 ts/logs_ts.ts
  61. +0 −147 ts/network_ts.ts
  62. +0 −930 ts/settings_ts.ts
  63. +5 −0 version-beta.go
  64. +5 −0 version.go
  65. +13 −17 {html → web/public}/configuration.html
  66. +7 −10 {html → web/public}/create-first-user.html
  67. +75 −32 {html → web/public}/css/base.css
  68. +38 −40 {html → web/public}/css/screen.css
  69. +4 −0 web/public/icons/chevron-double-up.svg
  70. BIN {html → web/public}/img/filter.png
  71. BIN {html → web/public}/img/log.png
  72. BIN {html → web/public}/img/logo_b_880x200.png
  73. BIN {html → web/public}/img/logo_w_600x200.png
  74. BIN {html → web/public}/img/logout.png
  75. BIN {html → web/public}/img/m3u.png
  76. BIN {html → web/public}/img/mapping.png
  77. BIN {html → web/public}/img/settings.png
  78. BIN {html → web/public}/img/threadfin.ico
  79. BIN {html → web/public}/img/threadfin.png
  80. BIN {html → web/public}/img/users.png
  81. BIN {html → web/public}/img/xmltv.png
  82. +101 −0 web/public/index.html
  83. +653 −0 web/public/lang/de.json
  84. +88 −12 {html → web/public}/lang/en.json
  85. +7 −10 {html → web/public}/login.html
  86. 0 {html → web/public}/maintenance.html
  87. BIN web/public/video/stream-limit.ts
  88. +9 −9 ts/authentication_ts.ts → web/src/ts/authentication.ts
  89. +211 −45 ts/base_ts.ts → web/src/ts/base.ts
  90. +177 −0 web/src/ts/configuration.ts
  91. +65 −0 web/src/ts/logs.ts
  92. +231 −127 ts/menu_ts.ts → web/src/ts/menu.ts
  93. +139 −0 web/src/ts/network.ts
  94. +158 −0 web/src/ts/option_dialogue.ts
  95. +184 −0 web/src/ts/server_information.ts
  96. +714 −0 web/src/ts/settings.ts
  97. +106 −0 web/src/ts/version_check.ts
  98. +2 −2 {ts → web}/tsconfig.json
59 changes: 49 additions & 10 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -3,24 +3,48 @@ on:
push:
branches:
- beta
paths:
- 'threadfin.go'
permissions:
contents: write

jobs:
buildBinaries:
name: Build and release binaries
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: beta

- name: Set build number
id: set-build-number
run: |
bash ${GITHUB_WORKSPACE}/Utility/set_build_number.sh ${{ vars.BUILD_NUMBER }}
- name: Update repo variable
run: |
bash ${GITHUB_WORKSPACE}/Utility/update_build_number_variable.sh ${{ secrets.API_TOKEN }} ${{ github.repository }} ${{ env.NEW_BUILD }}
- name: Build webUI
run: |
tsc -p ${GITHUB_WORKSPACE}/web/tsconfig.json
python ${GITHUB_WORKSPACE}/Utility/create_new_webUI.py
- name: Upload webUI as artifact
uses: actions/upload-artifact@v4
with:
name: webUI-artifact
path: ./src/webUI.go

- name: Set up and Build
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
id: go

- name: Build binaries
@@ -33,16 +57,27 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
name: Development Build
tag_name: latest-beta
name: v${{ env.NEW_VERSION }} (Beta)
tag_name: v${{ env.NEW_VERSION }}-beta
files: dist/*

buildDockerImages:
name: Build and push Docker images
runs-on: ubuntu-latest
needs: buildBinaries
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set NEW_VERSION
run: echo "NEW_VERSION=${{ needs.buildBinaries.outputs.new_version }}" >> $GITHUB_ENV
shell: bash

- name: Download webUI artifact
uses: actions/download-artifact@v4
with:
name: webUI-artifact
path: ./src

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -54,11 +89,15 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
build-args: BRANCH=beta
build-args: |
BUILD_FLAG=beta
VERSION=${{ env.NEW_VERSION }}
push: true
no-cache: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
tags: mgoerentz/threadfin:${{ github.ref_name }}
tags: |
mgoerentz/threadfin:latest-beta
mgoerentz/threadfin:v${{ env.NEW_VERSION }}-beta
114 changes: 114 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# This is a basic workflow that is manually triggered

name: Manual workflow

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
required: false
# The data type of the input
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
buildBinaries:
name: Build and release binaries
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set build number
id: set-build-number
run: |
bash ${GITHUB_WORKSPACE}/Utility/set_build_number.sh ${{ vars.BUILD_NUMBER }}
- name: Update repo variable
run: |
bash ${GITHUB_WORKSPACE}/Utility/update_build_number_variable.sh ${{ secrets.API_TOKEN }} ${{ github.repository }} ${{ env.NEW_BUILD }}
- name: Build webUI
run: |
tsc -p ${GITHUB_WORKSPACE}/web/tsconfig.json
python ${GITHUB_WORKSPACE}/Utility/create_new_webUI.py
- name: Upload webUI as artifact
uses: actions/upload-artifact@v4
with:
name: webUI-artifact
path: ./src/webUI.go

- name: Set up and Build
uses: actions/setup-go@v5
with:
go-version: 1.23
id: go

- name: Build binaries
run: |
go mod tidy && go mod vendor
echo "$PRIVATE_KEY=${{ secrets.SIGNING_KEY }}" >> $GITHUB_ENV
bash ${GITHUB_WORKSPACE}/Utility/create_binaries.sh beta
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
name: v${{ env.NEW_VERSION }} (Workflow Test)
tag_name: v${{ env.NEW_VERSION }}-test
files: dist/*

buildDockerImages:
name: Build and push Docker images
runs-on: ubuntu-latest
needs: buildBinaries
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set NEW_VERSION
run: echo "NEW_VERSION=${{ needs.buildBinaries.outputs.new_version }}" >> $GITHUB_ENV
shell: bash

- name: Download webUI artifact
uses: actions/download-artifact@v4
with:
name: webUI-artifact
path: ./src

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v6
with:
context: .
build-args: |
BUILD_FLAG=beta
VERSION=${{ env.NEW_VERSION }}
push: false
no-cache: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
64 changes: 52 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,84 @@
name: Threadfin Build
on:
push:
tags:
- 'v*'
branches:
- master

permissions:
contents: write
jobs:
buildBinaries:
name: Build and release binaries
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: main
ref: master

- name: Set build number
id: set-build-number
run: |
bash ${GITHUB_WORKSPACE}/Utility/set_build_number.sh ${{ vars.BUILD_NUMBER }}
- name: Update repo variable
run: |
bash ${GITHUB_WORKSPACE}/Utility/update_build_number_variable.sh ${{ secrets.API_TOKEN }} ${{ github.repository }} ${{ env.NEW_BUILD }}
- name: Build webUI
run: |
tsc -p ${GITHUB_WORKSPACE}/web/tsconfig.json
python ${GITHUB_WORKSPACE}/Utility/create_new_webUI.py
- name: Upload webUI as artifact
uses: actions/upload-artifact@v4
with:
name: webUI-artifact
path: ./src/webUI.go

- name: Set up and Build
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.23
id: go
- name: Build Binaries

- name: Build binaries
run: |
go mod tidy && go mod vendor
bash ${GITHUB_WORKSPACE}/Utility/create_binaries.sh
- name: Create a Release
uses: softprops/action-gh-release@v2
with:
token: "${{ secrets.GITHUB_TOKEN }}"
files: dist/*
name: v${{ env.NEW_VERSION }}
tag_name: v${{ env.NEW_VERSION }}
make_latest: true

buildDockerImages:
name: Build and push Docker Images
name: Build and push Docker images
runs-on: ubuntu-latest
needs: buildBinaries
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set NEW_VERSION
run: echo "NEW_VERSION=${{ needs.buildBinaries.outputs.new_version }}" >> $GITHUB_ENV
shell: bash

- name: Download webUI artifact
uses: actions/download-artifact@v4
with:
name: webUI-artifact
path: ./src

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

@@ -51,10 +89,12 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker Build and Push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
no-cache: true
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8
tags: mgoerentz/threadfin:latest,mgoerentz/threadfin:${{ github.ref_name }}
tags: |
mgoerentz/threadfin:latest
mgoerentz/threadfin:v${{ env.NEW_VERSION }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -9,3 +9,5 @@ dist/
node_modules/
*.exe
*.js
__debug*
**/.idea
Loading