feat: 使用 Gitea Container Registry 推送镜像

This commit is contained in:
2026-04-21 02:09:56 +08:00
parent 138d295bde
commit 3add416302
+14 -15
View File
@@ -62,19 +62,18 @@ jobs:
echo "VERSION=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT echo "VERSION=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT
fi fi
- name: Build Docker image - name: Login to Gitea Registry
run: | uses: docker/login-action@v3
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
with: with:
name: next-terminal-docker-${{ steps.version.outputs.VERSION }} registry: git.viaeon.com
path: next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz username: ${{ github.actor }}
retention-days: 7 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