34 lines
866 B
YAML
34 lines
866 B
YAML
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 |