Update .gitea/workflows/publish.yml
This commit is contained in:
@@ -1,75 +1,43 @@
|
||||
name: Publish Scene Search Jellyfin Plugin
|
||||
name: Publish Facial Recognition to Jellyfin
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release_tag:
|
||||
description: "Scene Search version tag, e.g. v0.1.5.0"
|
||||
required: true
|
||||
default: "v0.1.5.0"
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:20-bookworm
|
||||
options: --add-host=git.trufflemonkey.co.uk:51.195.138.163
|
||||
steps:
|
||||
- name: Check out Gitea distribution repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up SSH for private GitHub source
|
||||
- name: Configure read-only GitHub SSH access
|
||||
env:
|
||||
SOURCE_DEPLOY_KEY: ${{ secrets.SCENE_SEARCH_DEPLOY_KEY }}
|
||||
DEPLOY_KEY: ${{ secrets.FACIAL_RECOGNITION_DEPLOY_KEY }}
|
||||
run: |
|
||||
set -eu
|
||||
test -n "$SOURCE_DEPLOY_KEY" || { echo "Missing SCENE_SEARCH_DEPLOY_KEY"; exit 1; }
|
||||
install -d -m 700 ~/.ssh
|
||||
printf '%s\n' "$SOURCE_DEPLOY_KEY" > ~/.ssh/id_ed25519
|
||||
test -n "$DEPLOY_KEY" || { echo "Missing FACIAL_RECOGNITION_DEPLOY_KEY"; exit 1; }
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
printf '%s\n' "$DEPLOY_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
|
||||
- name: Clone private Scene Search at release tag
|
||||
- name: Clone private Facial Recognition source
|
||||
env:
|
||||
RELEASE_TAG: ${{ inputs.release_tag }}
|
||||
GIT_SSH_COMMAND: "ssh -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes"
|
||||
run: |
|
||||
set -eu
|
||||
git clone --filter=blob:none git@github.com:MrSleeps/jellyfin-scene-search.git source
|
||||
cd source
|
||||
git fetch origin "refs/tags/$RELEASE_TAG:refs/tags/$RELEASE_TAG"
|
||||
git checkout --detach "$RELEASE_TAG"
|
||||
git clone --depth 1 git@github.com:MrSleeps/jellyfin-facial-recognition.git facial-recognition
|
||||
|
||||
- name: Install .NET 10 SDK
|
||||
- name: Set up .NET 10 SDK
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Test Gitea API connectivity
|
||||
run: |
|
||||
echo "DNS resolution:"
|
||||
getent ahosts git.trufflemonkey.co.uk || true
|
||||
|
||||
echo "Testing Gitea API:"
|
||||
for i in 1 2 3 4 5; do
|
||||
echo "Attempt $i"
|
||||
curl -4 -v \
|
||||
--connect-timeout 5 \
|
||||
--max-time 15 \
|
||||
https://git.trufflemonkey.co.uk/api/v1/version
|
||||
echo
|
||||
done
|
||||
|
||||
- name: Build and publish
|
||||
- name: Build and publish Facial Recognition
|
||||
env:
|
||||
RELEASE_TAG: ${{ inputs.release_tag }}
|
||||
GITEA_URL: https://git.trufflemonkey.co.uk
|
||||
GITEA_REPO: sleeps/jellyfin-plugins
|
||||
GITEA_TOKEN: ${{ secrets.SCENE_SEARCH_RELEASE_TOKEN }}
|
||||
run: |
|
||||
set -eu
|
||||
test -n "$GITEA_TOKEN" || { echo "Missing SCENE_SEARCH_RELEASE_TOKEN"; exit 1; }
|
||||
cd source
|
||||
dotnet build jellyfin-plugin/Jellyfin.Plugin.SceneSearch/Jellyfin.Plugin.SceneSearch.csproj -c Release --nologo
|
||||
python3 scripts/publish-jellyfin-plugin.py --publish
|
||||
test -n "$GITEA_TOKEN" || { echo "Missing Gitea release token"; exit 1; }
|
||||
cd facial-recognition
|
||||
dotnet build jellyfin-plugin/Jellyfin.Plugin.FacialRecognition/Jellyfin.Plugin.FacialRecognition.csproj --configuration Release --nologo
|
||||
python3 scripts/publish-gitea-plugin.py
|
||||
Reference in New Issue
Block a user