From 3add4163025fcd60c2b6b2876f543e50ddd9b6ba Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 21 Apr 2026 02:09:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BD=BF=E7=94=A8=20Gitea=20Container?= =?UTF-8?q?=20Registry=20=E6=8E=A8=E9=80=81=E9=95=9C=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docker-image.yml | 29 ++++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index d9f54c8f6..79f937aab 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -62,19 +62,18 @@ jobs: echo "VERSION=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT fi - - name: Build Docker image - run: | - docker build -t next-terminal:${{ steps.version.outputs.VERSION }} . - echo "Docker image built successfully: next-terminal:${{ steps.version.outputs.VERSION }}" - - - name: Save Docker image - run: | - docker save next-terminal:${{ steps.version.outputs.VERSION}} | gzip > next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz - ls -lh next-terminal-*.tar.gz - - - name: Upload artifact - uses: actions/upload-artifact@v3.2.2 + - name: Login to Gitea Registry + uses: docker/login-action@v3 with: - name: next-terminal-docker-${{ steps.version.outputs.VERSION }} - path: next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz - retention-days: 7 + registry: git.viaeon.com + username: ${{ github.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + git.viaeon.com/${{ github.repository }}:${{ steps.version.outputs.VERSION }} + git.viaeon.com/${{ github.repository }}:latest