feat: 增加 Gitea Actions 支持
Some checks failed
Build Multi-Platform Docker Images / build (map[app_version:v2.0 buggy:false tag:v2.0]) (push) Failing after 2m59s
Build Multi-Platform Docker Images / build (map[app_version:v2.1 buggy:false tag:v2.1]) (push) Failing after 17s
Build Multi-Platform Docker Images / build (map[app_version:v3.0-buggy buggy:true tag:v3.0-buggy]) (push) Failing after 16s
Build Multi-Platform Docker Images / build (map[app_version:v1.0 buggy:false tag:v1.0]) (push) Has been cancelled
Some checks failed
Build Multi-Platform Docker Images / build (map[app_version:v2.0 buggy:false tag:v2.0]) (push) Failing after 2m59s
Build Multi-Platform Docker Images / build (map[app_version:v2.1 buggy:false tag:v2.1]) (push) Failing after 17s
Build Multi-Platform Docker Images / build (map[app_version:v3.0-buggy buggy:true tag:v3.0-buggy]) (push) Failing after 16s
Build Multi-Platform Docker Images / build (map[app_version:v1.0 buggy:false tag:v1.0]) (push) Has been cancelled
This commit is contained in:
53
.gitea/workflows/build.yml
Normal file
53
.gitea/workflows/build.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user