From 28a13039a38925a7cbfddbe2e6a8ac477589a291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?YC=E9=85=B1luyancib?= <2058282593@qq.com> Date: Tue, 3 Jun 2025 00:49:49 +0800 Subject: [PATCH] CI:Add autobuild docker image (#6) Co-authored-by: purofle Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/docker.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..6adc1dd --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,33 @@ +name: Docker + +on: + workflow_dispatch: + push: + branches: + - main # default branch + paths: + - bot/** + +jobs: + Ghcr: + name: Publish to ghcr.io + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.2.2 + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3.8.0 + - name: Login + uses: docker/login-action@v3.3.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build & Push + uses: docker/build-push-action@v6.11.0 + with: + context: . + push: true + tags: ghcr.io/purofle/sbbot:latest + platforms: linux/amd64,linux/arm64 + cache-from: type=registry,ref=ghcr.io/purofle/sbbot:latest + cache-to: type=inline