mirror of
https://github.com/gabehf/sonarr-seadex-proxy.git
synced 2026-03-11 08:20:58 -07:00
Compare commits
No commits in common. "main" and "v0.0.1" have entirely different histories.
3 changed files with 19 additions and 68 deletions
66
.github/workflows/docker.yml
vendored
66
.github/workflows/docker.yml
vendored
|
|
@ -1,66 +0,0 @@
|
||||||
# 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/')
|
|
||||||
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
|
|
||||||
4
main.go
4
main.go
|
|
@ -72,7 +72,7 @@ var (
|
||||||
|
|
||||||
// --- Main --- //
|
// --- Main --- //
|
||||||
func main() {
|
func main() {
|
||||||
log.Println("SonarrSeaDexProxy v0.0.2")
|
log.Println("SonarrSeaDexProxy v0.0.1")
|
||||||
port := "6778"
|
port := "6778"
|
||||||
|
|
||||||
http.HandleFunc("/api", apiHandler)
|
http.HandleFunc("/api", apiHandler)
|
||||||
|
|
@ -215,7 +215,7 @@ func handleTVSearch(w http.ResponseWriter, r *http.Request) {
|
||||||
Title: title,
|
Title: title,
|
||||||
GUID: GUID{
|
GUID: GUID{
|
||||||
IsPerma: "false",
|
IsPerma: "false",
|
||||||
Value: "seadex+" + nyaa.GUID,
|
Value: nyaa.GUID,
|
||||||
},
|
},
|
||||||
Link: br.DownloadURL,
|
Link: br.DownloadURL,
|
||||||
Size: br.Size,
|
Size: br.Size,
|
||||||
|
|
|
||||||
17
release.sh
Normal file
17
release.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# CHECKLIST
|
||||||
|
# Change version # in code
|
||||||
|
# Change version # below
|
||||||
|
# commit changes
|
||||||
|
# push commit
|
||||||
|
# run script
|
||||||
|
version=0.0.1
|
||||||
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue