From 1e4c268a43e297e572d6eba3266abb1654beb753 Mon Sep 17 00:00:00 2001 From: seahi Date: Wed, 17 Dec 2025 12:37:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=20Gitea=20Actions=20?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yml | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..0838d15 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,53 @@ +name: Build Multi-Platform Docker Images + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + version: + - tag: v1.0 + app_version: v1.0 + buggy: false + - tag: v2.0 + app_version: v2.0 + buggy: false + - tag: v2.1 + app_version: v2.1 + buggy: false + - tag: v3.0-buggy + app_version: v3.0-buggy + buggy: true + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Harbor + uses: docker/login-action@v3 + with: + registry: harbor.seahi.me + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + + - name: Build and push ${{ matrix.version.tag }} + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/386,linux/arm64 + push: true + tags: harbor.seahi.me/stu/versions-for-swarm:${{ matrix.version.tag }} + build-args: | + APP_VERSION=${{ matrix.version.app_version }} + BUGGY=${{ matrix.version.buggy }} + cache-from: type=registry,ref=harbor.seahi.me/stu/versions-for-swarm:buildcache + cache-to: type=registry,ref=harbor.seahi.me/stu/versions-for-swarm:buildcache,mode=max