添加docker工作流
This commit is contained in:
36
.gitea/workflows/docker-ci.yml
Normal file
36
.gitea/workflows/docker-ci.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Docker Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.tunnel.litchi.quest # 你的 Gitea 地址
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64 # 多平台构建
|
||||
tags: |
|
||||
gitea.tunnel.litchi.quest/${{ gitea.repository }}:${{ github.ref_name }}
|
||||
gitea.tunnel.litchi.quest/${{ gitea.repository }}:nightly
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
Reference in New Issue
Block a user