From 555c812b6a0f34b6798a857c8cbc6db22ed9defc Mon Sep 17 00:00:00 2001 From: wibus-wee <1596355173@qq.com> Date: Sun, 7 Jul 2024 19:24:46 +0800 Subject: [PATCH] ci: add docker ci --- .github/workflows/docker.yml | 47 ++++++++++++++++++++++++++++++++++++ README.md | 10 +------- 2 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..de376ef15 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,47 @@ +name: Docker Build + +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + paths: + - '.github/workflows/docker.yml' + - 'Dockerfile' + branches: + - '**' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + # list of Docker images to use as base name for tags + images: | + innei/mx-kami + # generate Docker tags based on the following events/attributes + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + id: docker_build + uses: docker/build-push-action@v5 + with: + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }},innei/mx-kami:latest + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/README.md b/README.md index ee57c8afe..d97588166 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,8 @@ 如果你发现了 Kami 与 Core 的不兼容问题,请提交 issue 并描述具体问题,我会尽快修复。 -此项目针对 CI/CD 流程有做出改变: - -- Release 阶段 Docker Image 将不会发布在原 Docker Hub 中. 未来有关 Docker Image 的发布目前待定。 - -## BREAKING CHANGES - - Note Music 需要在「附加字段」中加入 `music` 字段,内容为音乐的 Netease ID. 且仅支持一个音乐 ID。 -- Favorite Music 由于 (wibus-wee/kami#1)[https://github.com/wibus-wee/kami/issues/1] 的缘故暂时失效 - -以下是原项目的 README: +- Favorite Music 暂时失效 ---