Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/docker_beta_v3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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:
if: github.repository == 'mebtte/cicada'
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
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.'

## 清理构建产物
Expand Down
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" \
Expand Down
2 changes: 0 additions & 2 deletions docker/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 0 additions & 7 deletions docker/docker_build_and_push.sh

This file was deleted.

2 changes: 0 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading