Files
infrastructure/.gitea/workflows/update-playlist.yml
Alex Mickelson b8ac104002
Some checks failed
Apply Kuberentes Configs / update-repo (push) Failing after 0s
Apply Kuberentes Configs / update-infrastructure (push) Has been skipped
Update home server containers / update-repo (push) Failing after 0s
Update home server containers / update-infrastructure (push) Has been skipped
updates to paths
2026-01-27 21:46:44 -07:00

38 lines
1.5 KiB
YAML

name: Manage Jellyfin Playlists
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
run-python:
runs-on: [self-hosted, home-server]
steps:
- name: checkout repo
working-directory: /home/gitea-runner/infrastructure
run: |
if [ -d "infrastructure" ]; then
cd infrastructure
echo "Infrastructure folder exists. Resetting to the most recent commit."
git reset --hard HEAD
git pull https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} $(git rev-parse --abbrev-ref HEAD)
else
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
fi
- name: Run Python script
env:
JELLYFIN_USER: ${{ secrets.JELLYFIN_USER }}
JELLYFIN_PASSWORD: ${{ secrets.JELLYFIN_PASSWORD }}
working-directory: /home/gitea-runner/infrastructure/infrastructure
run: |
docker build -t jellyfin_management -f jellyfin/Dockerfile .
docker run --rm \
-e JELLYFIN_USER=$JELLYFIN_USER \
-e JELLYFIN_PASSWORD=$JELLYFIN_PASSWORD \
jellyfin_management \
-m jellyfin.update_all_songs_playlist
docker run --rm \
-e JELLYFIN_USER=$JELLYFIN_USER \
-e JELLYFIN_PASSWORD=$JELLYFIN_PASSWORD \
jellyfin_management \
-m jellyfin.update_unindexed