Files
versions-for-swarm/.gitea/workflows/build.yml
seahi c75e679a92
Some checks failed
Build Docker Images / build (map[app_version:v1.0 buggy:false tag:v1.0]) (push) Failing after 10s
Build Docker Images / build (map[app_version:v2.0 buggy:false tag:v2.0]) (push) Failing after 10s
Build Docker Images / build (map[app_version:v2.1 buggy:false tag:v2.1]) (push) Failing after 9s
Build Docker Images / build (map[app_version:v3.0-buggy buggy:true tag:v3.0-buggy]) (push) Failing after 10s
feat: 精简镜像构架支持
2025-12-17 12:41:50 +08:00

51 lines
1.3 KiB
YAML

name: Build 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: 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
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