mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-06-14 22:18:02 +08:00
Merge branch 'main' into 3.0-dev
# Conflicts: # .github/workflows/release.yml # src/module/manager/renamer.py
This commit is contained in:
27
.github/workflows/dev-latest.yml
vendored
27
.github/workflows/dev-latest.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Deploy To Dockerhub(dev)
|
||||
name: Build Docker(dev)
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -37,20 +37,27 @@ jobs:
|
||||
working-directory: ./src
|
||||
run: |
|
||||
echo "VERSION = '$GITHUB_REF_NAME'" > module/__version__.py
|
||||
-
|
||||
name: Set up QEMU
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
|
||||
- name: Login to ghcr.io
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ secrets.GITHUB_USERNAME }}
|
||||
password: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
@@ -58,6 +65,8 @@ jobs:
|
||||
tags: |
|
||||
estrellaxd/auto_bangumi:dev-latest
|
||||
estrellaxd/auto_bangumi:${{ github.ref_name }}
|
||||
ghcr.io/estrellaxd/auto_bangumi:dev-latest
|
||||
ghcr.io/estrellaxd/auto_bangumi:${{ github.ref_name }}
|
||||
file: Dockerfile
|
||||
|
||||
generate_release:
|
||||
|
||||
16
.github/workflows/docker.yml
vendored
16
.github/workflows/docker.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build(Docker)
|
||||
name: Build Docker
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -62,6 +62,14 @@ jobs:
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Login to ghcr.io
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
@@ -69,7 +77,9 @@ jobs:
|
||||
builder: ${{ steps.buildx.output.name }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm
|
||||
push: ${{ github.event_name == 'push' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
tags: |
|
||||
docker.io/estrellaxd/auto_bangumi:${{ steps.meta.outputs.tags }}
|
||||
ghcr.io/estrellaxd/auto_bangumi:${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha, scope=${{ github.workflow }}
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
|
||||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
@@ -10,9 +10,9 @@ on:
|
||||
jobs:
|
||||
generate_release_draft:
|
||||
runs-on: ubuntu-latest
|
||||
if:
|
||||
- github.event.pull_request.merged == true
|
||||
- github.event.pull_request.base.ref == 'main'
|
||||
if: >
|
||||
github.event.pull_request.merged == true &&
|
||||
github.event.pull_request.base.ref == 'main'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
from module.network import RequestContent
|
||||
from module.conf import settings
|
||||
|
||||
|
||||
class RSSSearcher(RequestContent):
|
||||
|
||||
def __search_url(self, keywords: str) -> str:
|
||||
keywords.replace(" ", "+")
|
||||
url = f"{settings.rss_parser.custom_url}/RSS/Search?keyword={keywords}"
|
||||
return url
|
||||
|
||||
def search_keywords(self, keywords: str) -> list[dict]:
|
||||
url = self.__search_url(keywords)
|
||||
torrents = self.get_torrents(url)
|
||||
return torrents
|
||||
|
||||
Reference in New Issue
Block a user