From 03772649261dcc32928df9abd00039f9977402df Mon Sep 17 00:00:00 2001
From: tu1h <1154211572@qq.com>
Date: Sun, 27 Oct 2024 23:36:39 +0800
Subject: [PATCH] Add alpine workflow build

---
 .github/workflows/build.yml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 70a4ea1..4d5038a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,10 +12,20 @@ permissions:
 jobs:
   build:
     runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+        - branch: main
+          tag: latest
+        - branch: alpine
+          tag: alpine
+
     steps:
     - uses: actions/checkout@v3
       with:
         fetch-depth: 0
+        ref: ${{ matrix.branch }}
 
     - uses: docker/setup-buildx-action@v3.6.1
 
@@ -40,8 +50,8 @@ jobs:
         provenance: false
         platforms: linux/amd64, linux/arm64
         tags: |
-          ghcr.io/${{ github.repository }}/wechotd
-          ${{ secrets.ALIYUN_REGISTRY_REPOSITORY }}
+          ghcr.io/${{ github.repository }}/wechotd:${{ matrix.tag }}
+          ${{ secrets.ALIYUN_REGISTRY_REPOSITORY }}:${{ matrix.tag }}
         cache-from: type=gha
         cache-to: type=gha,mode=max