Skip to content

Commit b20b381

Browse files
committed
revert: restore original workflow settings and add telegram notifications
1 parent 9e09f23 commit b20b381

2 files changed

Lines changed: 27 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types:
66
- closed
77
branches:
8-
- aio_test
8+
- main
99
push:
1010

1111
jobs:
@@ -14,14 +14,14 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616
- name: Set up Python 3.11
17-
uses: actions/setup-python@v4
17+
uses: actions/setup-python@v3
1818
with:
1919
python-version: "3.11"
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
2323
if [ -f backend/requirements.txt ]; then pip install -r backend/requirements.txt; fi
24-
pip install pytest pytest-asyncio
24+
pip install pytest
2525
- name: Test
2626
working-directory: ./backend/src
2727
run: |
@@ -121,10 +121,12 @@ jobs:
121121
steps:
122122
- name: Checkout
123123
uses: actions/checkout@v4
124+
124125
- name: Install Node.js
125126
uses: actions/setup-node@v4
126127
with:
127128
node-version: 20
129+
128130
- uses: pnpm/action-setup@v4
129131
name: Install pnpm
130132
with:
@@ -152,7 +154,7 @@ jobs:
152154
cd webui && pnpm build
153155
154156
- name: Upload artifact
155-
uses: actions/upload-artifact@v4
157+
uses: actions/upload-artifact@v3
156158
with:
157159
name: dist
158160
path: webui/dist
@@ -183,7 +185,7 @@ jobs:
183185
uses: docker/metadata-action@v4
184186
with:
185187
images: |
186-
shinonomeow/auto_bangumi
188+
estrellaxd/auto_bangumi
187189
ghcr.io/${{ github.repository }}
188190
tags: |
189191
type=raw,value=${{ needs.version-info.outputs.version }}
@@ -195,7 +197,7 @@ jobs:
195197
uses: docker/metadata-action@v4
196198
with:
197199
images: |
198-
shinonomeow/auto_bangumi
200+
estrellaxd/auto_bangumi
199201
ghcr.io/${{ github.repository }}
200202
tags: |
201203
type=raw,value=${{ needs.version-info.outputs.version }}
@@ -217,7 +219,7 @@ jobs:
217219
password: ${{ secrets.ACCESS_TOKEN }}
218220

219221
- name: Download artifact
220-
uses: actions/download-artifact@v4
222+
uses: actions/download-artifact@v3
221223
with:
222224
name: dist
223225
path: backend/src/dist
@@ -256,7 +258,7 @@ jobs:
256258
builder: ${{ steps.buildx.output.name }}
257259
platforms: linux/amd64,linux/arm64,linux/arm/v7
258260
push: false
259-
tags: shinonomeow/auto_bangumi:test
261+
tags: estrellaxd/auto_bangumi:test
260262
cache-from: type=gha, scope=${{ github.workflow }}
261263
cache-to: type=gha, scope=${{ github.workflow }}
262264

@@ -272,7 +274,7 @@ jobs:
272274
uses: actions/checkout@v4
273275

274276
- name: Download artifact webui
275-
uses: actions/download-artifact@v4
277+
uses: actions/download-artifact@v3
276278
with:
277279
name: dist
278280
path: webui/dist
@@ -282,7 +284,7 @@ jobs:
282284
cd webui && ls -al && tree && zip -r dist.zip dist
283285
284286
- name: Download artifact app
285-
uses: actions/download-artifact@v4
287+
uses: actions/download-artifact@v3
286288
with:
287289
name: dist
288290
path: backend/src/dist
@@ -325,4 +327,17 @@ jobs:
325327
webui/dist.zip
326328
backend/app-v${{ needs.version-info.outputs.version }}.zip
327329
env:
328-
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
330+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
331+
332+
telegram:
333+
runs-on: ubuntu-latest
334+
needs: [release]
335+
steps:
336+
- name: send telegram message on push
337+
uses: appleboy/telegram-action@master
338+
with:
339+
to: ${{ secrets.TELEGRAM_TO }}
340+
token: ${{ secrets.TELEGRAM_TOKEN }}
341+
message: |
342+
New release: ${{ needs.release.outputs.version }}
343+
Link: ${{ needs.release.outputs.url }}

backend/src/module/api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from .rss import router as rss_router
1010
from .search import router as search_router
1111

12-
__all__ = ["v1"]
12+
__all__ = ["v1","lifespan"]
1313

1414
# API 1.0
1515
v1 = APIRouter(prefix="/v1")

0 commit comments

Comments
 (0)