Skip to content

Commit 39a12ff

Browse files
committed
test_build
1 parent 2d71418 commit 39a12ff

1 file changed

Lines changed: 1 addition & 117 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -159,112 +159,9 @@ jobs:
159159
name: dist
160160
path: webui/dist
161161

162-
build-docker:
163-
runs-on: ubuntu-latest
164-
needs: [build-webui, version-info]
165-
steps:
166-
- name: Checkout
167-
uses: actions/checkout@v4
168-
169-
- name: Create Version info via tag
170-
working-directory: ./backend/src
171-
run: |
172-
echo ${{ needs.version-info.outputs.version }}
173-
echo "VERSION='${{ needs.version-info.outputs.version }}'" >> module/__version__.py
174-
175-
- name: Set up QEMU
176-
uses: docker/setup-qemu-action@v2
177-
178-
- name: Set up Docker Buildx
179-
id: buildx
180-
uses: docker/setup-buildx-action@v2
181-
182-
- name: Docker metadata main
183-
if: ${{ needs.version-info.outputs.release == 1 && needs.version-info.outputs.dev != 1 }}
184-
id: meta
185-
uses: docker/metadata-action@v4
186-
with:
187-
images: |
188-
estrellaxd/auto_bangumi
189-
ghcr.io/${{ github.repository }}
190-
tags: |
191-
type=raw,value=${{ needs.version-info.outputs.version }}
192-
type=raw,value=latest
193-
194-
- name: Docker metadata dev
195-
if: ${{ needs.version-info.outputs.dev == 1 }}
196-
id: meta-dev
197-
uses: docker/metadata-action@v4
198-
with:
199-
images: |
200-
estrellaxd/auto_bangumi
201-
ghcr.io/${{ github.repository }}
202-
tags: |
203-
type=raw,value=${{ needs.version-info.outputs.version }}
204-
type=raw,value=dev-latest
205-
206-
- name: Login to DockerHub
207-
if: ${{ needs.version-info.outputs.release == 1 }}
208-
uses: docker/login-action@v2
209-
with:
210-
username: ${{ secrets.DOCKER_HUB_USERNAME }}
211-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
212-
213-
- name: Login to ghcr.io
214-
if: ${{ needs.version-info.outputs.release == 1 }}
215-
uses: docker/login-action@v2
216-
with:
217-
registry: ghcr.io
218-
username: ${{ github.actor }}
219-
password: ${{ secrets.ACCESS_TOKEN }}
220-
221-
- name: Download artifact
222-
uses: actions/download-artifact@v4
223-
with:
224-
name: dist
225-
path: backend/src/dist
226-
227-
- name: Build and push
228-
if: ${{ needs.version-info.outputs.release == 1 && needs.version-info.outputs.dev != 1 }}
229-
uses: docker/build-push-action@v4
230-
with:
231-
context: .
232-
builder: ${{ steps.buildx.output.name }}
233-
platforms: linux/amd64,linux/arm64,linux/arm/v7
234-
push: True
235-
tags: ${{ steps.meta.outputs.tags }}
236-
labels: ${{ steps.meta.outputs.labels }}
237-
cache-from: type=gha, scope=${{ github.workflow }}
238-
cache-to: type=gha, scope=${{ github.workflow }}
239-
240-
- name: Build and push dev
241-
if: ${{ needs.version-info.outputs.dev == 1 }}
242-
uses: docker/build-push-action@v4
243-
with:
244-
context: .
245-
builder: ${{ steps.buildx.output.name }}
246-
platforms: linux/amd64,linux/arm64,linux/arm/v7
247-
push: ${{ github.event_name == 'push' }}
248-
tags: ${{ steps.meta-dev.outputs.tags }}
249-
labels: ${{ steps.meta-dev.outputs.labels }}
250-
cache-from: type=gha, scope=${{ github.workflow }}
251-
cache-to: type=gha, scope=${{ github.workflow }}
252-
253-
- name: Build test
254-
if: ${{ needs.version-info.outputs.release == 0 }}
255-
uses: docker/build-push-action@v4
256-
with:
257-
context: .
258-
builder: ${{ steps.buildx.output.name }}
259-
platforms: linux/amd64,linux/arm64,linux/arm/v7
260-
push: false
261-
tags: estrellaxd/auto_bangumi:test
262-
cache-from: type=gha, scope=${{ github.workflow }}
263-
cache-to: type=gha, scope=${{ github.workflow }}
264-
265162
release:
266163
runs-on: ubuntu-latest
267-
needs: [build-docker, version-info]
164+
needs: [version-info]
268165
if: ${{ needs.version-info.outputs.release == 1 }}
269166
outputs:
270167
url: ${{ steps.release.outputs.url }}
@@ -335,16 +232,3 @@ jobs:
335232
backend/app-v${{ needs.version-info.outputs.version }}.zip
336233
env:
337234
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
338-
339-
telegram:
340-
runs-on: ubuntu-latest
341-
needs: [release]
342-
steps:
343-
- name: send telegram message on push
344-
uses: appleboy/telegram-action@master
345-
with:
346-
to: ${{ secrets.TELEGRAM_TO }}
347-
token: ${{ secrets.TELEGRAM_TOKEN }}
348-
message: |
349-
New release: ${{ needs.release.outputs.version }}
350-
Link: ${{ needs.release.outputs.url }}

0 commit comments

Comments
 (0)