From ddaafeb9623bafc2316ce9807db0ffa7d79c4f91 Mon Sep 17 00:00:00 2001 From: David Young Date: Wed, 23 Oct 2024 16:49:51 +1300 Subject: [PATCH] first cut at redditio Signed-off-by: David Young --- apps/redditio/Dockerfile | 19 +++++++++++++++++++ apps/redditio/ci/goss.yaml | 10 ++++++++++ apps/redditio/ci/latest.sh | 3 +++ apps/redditio/metadata.json | 17 +++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 apps/redditio/Dockerfile create mode 100644 apps/redditio/ci/goss.yaml create mode 100755 apps/redditio/ci/latest.sh create mode 100644 apps/redditio/metadata.json diff --git a/apps/redditio/Dockerfile b/apps/redditio/Dockerfile new file mode 100644 index 0000000000..cf60d7719c --- /dev/null +++ b/apps/redditio/Dockerfile @@ -0,0 +1,19 @@ +# Get the upstream code +FROM alpine:latest as cloner +ARG CHANNEL +ARG VERSION + +RUN apk update && apk upgrade && \ + apk add --no-cache git + +RUN git clone https://github.com/ReemX/stremio-comments-addon.git /source + +FROM denoland/deno:latest as base + +WORKDIR /app + +COPY --from=cloner /source/. ./ + +RUN deno install + +CMD ["deno", "task", "dev"] diff --git a/apps/redditio/ci/goss.yaml b/apps/redditio/ci/goss.yaml new file mode 100644 index 0000000000..6ceadbaf58 --- /dev/null +++ b/apps/redditio/ci/goss.yaml @@ -0,0 +1,10 @@ +--- +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#process +process: + deno: + running: true + +# https://github.com/aelsabbahy/goss/blob/master/docs/manual.md#http +http: + http://localhost:7000: + status: 200 diff --git a/apps/redditio/ci/latest.sh b/apps/redditio/ci/latest.sh new file mode 100755 index 0000000000..50a63387e7 --- /dev/null +++ b/apps/redditio/ci/latest.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +version=$(curl -sX GET "https://api.github.com/repos/ReemX/stremio-comments-addon/commits/main" --header "Authorization: Bearer ${TOKEN}" | jq --raw-output '.sha') +printf "%s" "${version}" diff --git a/apps/redditio/metadata.json b/apps/redditio/metadata.json new file mode 100644 index 0000000000..a745b8fefc --- /dev/null +++ b/apps/redditio/metadata.json @@ -0,0 +1,17 @@ +{ + "app": "redditio", + "base": false, + "channels": [ + { + "name": "main", + "platforms": [ + "linux/amd64" + ], + "stable": true, + "tests": { + "enabled": true, + "type": "web" + } + } + ] +}