-
Notifications
You must be signed in to change notification settings - Fork 729
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: emby metadata downloader | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "emby_metadata_downloader/**" | ||
- ".github/workflows/build_emby_metadata_downloader.yml" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build Docker Image | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ secrets.DOCKER_USERNAME }}/xiaoya-emd | ||
tags: | | ||
type=raw,value=latest | ||
- | ||
name: Set Up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- | ||
name: Set Up Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- | ||
name: Login DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- | ||
name: Build Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./emby_metadata_downloader | ||
file: emby_metadata_downloader/Dockerfile | ||
platforms: | | ||
linux/amd64 | ||
linux/arm64/v8 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- | ||
name: Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v4 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ secrets.DOCKER_USERNAME }}/xiaoya-emd | ||
short-description: 小雅Alist的相关周边 | ||
readme-filepath: ./emby_metadata_downloader/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM python:3.12-alpine3.19 | ||
|
||
ENV TZ=Asia/Shanghai \ | ||
CYCLE=86400 | ||
|
||
RUN set -ex && \ | ||
apk add --no-cache \ | ||
bash \ | ||
git \ | ||
tzdata && \ | ||
git clone -b main https://github.com/Rik-F5/xiaoya_db.git /app && \ | ||
python3 -m pip install --no-cache-dir --upgrade pip && \ | ||
pip install --no-cache-dir -r /app/requirements.txt | ||
|
||
COPY --chmod=755 entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
|
||
CMD --media /media --db true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 小雅同步元数据 | ||
|
||
高速异步爬虫从 https://emby.xiaoya.pro/ 同步小雅元数据 | ||
|
||
## Run | ||
|
||
```shell | ||
docker run -d \ | ||
--name=xiaoya-emd \ | ||
--restart=always \ | ||
--net=host \ | ||
-v 媒体库目录:/media \ | ||
-e CYCLE=86400 \ | ||
ddsderek/xiaoya-emd:latest | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# shellcheck shell=bash | ||
# shellcheck disable=SC2068 | ||
|
||
cd /app || exit | ||
|
||
while true; do | ||
python3 solid.py $@ | ||
sleep "${CYCLE}" | ||
done |