From 4dac46dbf61177afe31ce6d6332006b19590bc56 Mon Sep 17 00:00:00 2001 From: anyone Date: Fri, 24 Apr 2026 15:41:15 +0800 Subject: [PATCH 1/3] update docs --- docker/docker.md | 2 -- docker/docker_build_and_push.sh | 7 ------- readme.md | 2 -- 3 files changed, 11 deletions(-) delete mode 100755 docker/docker_build_and_push.sh diff --git a/docker/docker.md b/docker/docker.md index f36a495f..a232bf4d 100644 --- a/docker/docker.md +++ b/docker/docker.md @@ -3,6 +3,4 @@ A multi-user music service for self-hosting. For more information, please see [here](https://github.com/mebtte/cicada). ![version](https://img.shields.io/github/v/release/mebtte/cicada?style=for-the-badge) -![release build](https://img.shields.io/github/actions/workflow/status/mebtte/cicada/build_and_release.yaml?label=release%20build&style=for-the-badge) -![docker build](https://img.shields.io/github/actions/workflow/status/mebtte/cicada/docker_build_and_push.yaml?label=docker%20build&style=for-the-badge) ![license](https://img.shields.io/github/license/mebtte/cicada?style=for-the-badge) diff --git a/docker/docker_build_and_push.sh b/docker/docker_build_and_push.sh deleted file mode 100755 index 7e41904c..00000000 --- a/docker/docker_build_and_push.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -e - -ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" - -"$ROOT_DIR/build.sh" docker -docker buildx build -t mebtte/cicada:$1 -f "$ROOT_DIR/docker/Dockerfile" --platform=linux/amd64 --push "$ROOT_DIR" diff --git a/readme.md b/readme.md index 146a33de..c2cdabb6 100644 --- a/readme.md +++ b/readme.md @@ -3,8 +3,6 @@ A multi-user music service for self-hosting. ![version](https://img.shields.io/github/v/release/mebtte/cicada?style=for-the-badge) -![release build](https://img.shields.io/github/actions/workflow/status/mebtte/cicada/build_and_release.yaml?label=release%20build&style=for-the-badge) -![docker build](https://img.shields.io/github/actions/workflow/status/mebtte/cicada/docker_build_and_push.yaml?label=docker%20build&style=for-the-badge) ![license](https://img.shields.io/github/license/mebtte/cicada?style=for-the-badge) todo: screenshot From da8c26e0e896dd8f45c954ea7fe0ca8aef95b38b Mon Sep 17 00:00:00 2001 From: anyone Date: Fri, 24 Apr 2026 16:54:02 +0800 Subject: [PATCH 2/3] docker v3 beta --- .github/workflows/docker_beta_v3.yaml | 68 +++++++++++++++++++++++++++ Makefile | 10 ++-- docker/Dockerfile | 5 +- 3 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/docker_beta_v3.yaml diff --git a/.github/workflows/docker_beta_v3.yaml b/.github/workflows/docker_beta_v3.yaml new file mode 100644 index 00000000..75cd27ff --- /dev/null +++ b/.github/workflows/docker_beta_v3.yaml @@ -0,0 +1,68 @@ +name: docker beta.v3 + +on: + push: + branches: + - beta.v3 + paths: + - '.github/workflows/docker_beta_v3.yaml' + - 'Makefile' + - 'docker/**' + - 'scripts/**' + - 'apps/cli/**' + - 'apps/pwa/**' + +concurrency: + group: docker-beta-v3 + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build-and-push: + name: Build And Push Docker Image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + token: ${{ secrets.TOKEN }} + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: apps/pwa/package-lock.json + + - uses: actions/setup-go@v5 + with: + go-version-file: apps/cli/go.mod + + - uses: docker/setup-qemu-action@v3 + + - uses: docker/setup-buildx-action@v3 + + - name: Build Docker binaries + run: make docker + + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - uses: docker/build-push-action@v6 + with: + context: . + file: docker/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/cicada:beta.v3 + + - name: Update Docker Hub overview + uses: peter-evans/dockerhub-description@v5 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + repository: ${{ secrets.DOCKERHUB_USERNAME }}/cicada + readme-filepath: ./docker/docker.md diff --git a/Makefile b/Makefile index 75f03c6f..ff09d346 100644 --- a/Makefile +++ b/Makefile @@ -79,11 +79,13 @@ release: pwa ffmpeg-bundles $(BUILD_DIR)/linux-amd64 \ $(BUILD_DIR)/linux-arm64 -## 构建 Linux x64 二进制 (供 Docker 使用, 不压缩) -docker: pwa ffmpeg-bundle-linux-amd64 +## 构建 Linux 多架构二进制 (供 Docker buildx 使用, 不压缩) +docker: pwa ffmpeg-bundle-linux-amd64 ffmpeg-bundle-linux-arm64 rm -rf $(BUILD_DIR) - mkdir -p $(BUILD_DIR) - $(call build_cli,linux,amd64,$(BUILD_DIR)/cicada) + mkdir -p $(BUILD_DIR)/linux-amd64 + $(call build_cli,linux,amd64,$(BUILD_DIR)/linux-amd64/cicada) + mkdir -p $(BUILD_DIR)/linux-arm64 + $(call build_cli,linux,arm64,$(BUILD_DIR)/linux-arm64/cicada) @echo 'skip compression on docker building.' ## 清理构建产物 diff --git a/docker/Dockerfile b/docker/Dockerfile index a8ed4e12..9d36f669 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,6 +1,9 @@ FROM ubuntu -COPY build/cicada /bin/cicada +ARG TARGETOS=linux +ARG TARGETARCH=amd64 + +COPY build/${TARGETOS}-${TARGETARCH}/cicada /bin/cicada ENTRYPOINT ["/bin/cicada"] LABEL org.opencontainers.image.title="cicada" \ From 67ab7874b9ef4bdffbfd56c1ad1fce9236ac6e49 Mon Sep 17 00:00:00 2001 From: anyone Date: Fri, 24 Apr 2026 17:04:05 +0800 Subject: [PATCH 3/3] improve docker beta build --- .github/workflows/docker_beta_v3.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker_beta_v3.yaml b/.github/workflows/docker_beta_v3.yaml index 75cd27ff..66f1b59e 100644 --- a/.github/workflows/docker_beta_v3.yaml +++ b/.github/workflows/docker_beta_v3.yaml @@ -21,6 +21,7 @@ permissions: jobs: build-and-push: + if: github.repository == 'mebtte/cicada' name: Build And Push Docker Image runs-on: ubuntu-latest steps: