From 8495a8ad9e2b70e12b57017fe7133ac8aecf3c07 Mon Sep 17 00:00:00 2001 From: movingsam Date: Thu, 26 Feb 2026 10:58:40 +0800 Subject: [PATCH] Add Docker CI workflow --- .gitea/workflows/docker.yml | 45 +++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/docker.yml diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml new file mode 100644 index 0000000..852b6d2 --- /dev/null +++ b/.gitea/workflows/docker.yml @@ -0,0 +1,45 @@ +name: Build and Push Docker + +on: + push: + branches: [main] + tags: + - "v*" + +env: + REGISTRY: gitea.shtao1.cn + IMAGE_NAME: movingsam/fengling-console + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Gitea + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: movingsam + password: ${{ secrets.GITEA_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=sha + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file