From 0c23dbd12bd540c02d07709315fa1327a397e350 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Mon, 15 Sep 2025 19:48:28 -0400 Subject: [PATCH 1/3] make guid unique from nyaa --- main.go | 4 ++-- release.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 release.sh diff --git a/main.go b/main.go index c67fa6d..fc4568b 100644 --- a/main.go +++ b/main.go @@ -72,7 +72,7 @@ var ( // --- Main --- // func main() { - log.Println("SonarrSeaDexProxy v0.0.1") + log.Println("SonarrSeaDexProxy v0.0.2") port := "6778" http.HandleFunc("/api", apiHandler) @@ -215,7 +215,7 @@ func handleTVSearch(w http.ResponseWriter, r *http.Request) { Title: title, GUID: GUID{ IsPerma: "false", - Value: nyaa.GUID, + Value: "seadex+" + nyaa.GUID, }, Link: br.DownloadURL, Size: br.Size, diff --git a/release.sh b/release.sh old mode 100644 new mode 100755 index f7f9b18..3356542 --- a/release.sh +++ b/release.sh @@ -6,7 +6,7 @@ # commit changes # push commit # run script -version=0.0.1 +version=0.0.2 image_name=gabehf/sonarr-seadex-proxy git tag v$version From 90709585c7d0a8770d7f39202e49fd0f45b68878 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Sun, 30 Nov 2025 17:42:23 -0500 Subject: [PATCH 2/3] chore: ci --- .github/workflows/docker.yml | 67 ++++++++++++++++++++++++++++++++++++ release.sh | 17 --------- 2 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/docker.yml delete mode 100755 release.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..d0a5597 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,67 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# GitHub recommends pinning actions to a commit SHA. +# To get a newer version, you will need to update the SHA. +# You can also reference a tag or branch, but the action may change without warning. + +name: Publish Docker image + +on: + push: + tags: + - "v*" + + workflow_dispatch: + +jobs: + # test: + # name: Go Test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + + # - name: Set up Go + # uses: actions/setup-go@v5 + # with: + # go-version-file: go.mod + + # - name: Build + # run: go build -v ./... + + # - name: Test + # uses: robherley/go-test-action@v0 + + push_to_registry: + name: Push Docker image to Docker Hub (release) + if: startsWith(github.ref, 'refs/tags/') + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Extract tag version + run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + + - name: Build and push release image + id: push + uses: docker/build-push-action@v6 + with: + context: . + file: ./Dockerfile + push: true + tags: | + gabehf/sonarr-seadex-proxy:latest + gabehf/sonarr-seadex-proxy:${{ env.VERSION }} + platforms: linux/amd64,linux/arm64 diff --git a/release.sh b/release.sh deleted file mode 100755 index 3356542..0000000 --- a/release.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# CHECKLIST -# Change version # in code -# Change version # below -# commit changes -# push commit -# run script -version=0.0.2 -image_name=gabehf/sonarr-seadex-proxy - -git tag v$version -git push origin v$version -docker build --tag $image_name:$version . -docker tag $image_name:$version $image_name:latest -docker push $image_name:$version -docker push $image_name:latest \ No newline at end of file From f5d314eeff65c7202513ea3f42d0d763beed0a61 Mon Sep 17 00:00:00 2001 From: Gabe Farrell Date: Sun, 30 Nov 2025 17:50:22 -0500 Subject: [PATCH 3/3] forgot to remove dependency lol --- .github/workflows/docker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d0a5597..5d9464b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,7 +37,6 @@ jobs: push_to_registry: name: Push Docker image to Docker Hub (release) if: startsWith(github.ref, 'refs/tags/') - needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4