From 69cbfd9c2ea96d0f9a6bdcaa2699b42addb476a0 Mon Sep 17 00:00:00 2001 From: Zpekii Date: Sat, 24 Jan 2026 20:35:37 +0800 Subject: [PATCH] ci: update --- .gitea/workflows/deploy.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b50c693..3f78adc 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -31,6 +31,8 @@ jobs: go version - name: Run golangci-lint uses: http://10.42.0.203:3000/golangci/golangci-lint-action@v9.2.0 + with: + fetch-depth: 1 - name: Tests run: | cd ${{ gitea.workspace }} @@ -53,15 +55,15 @@ jobs: - name: Push Docker image to local registry run: | docker push localhost:8180/go-example/go-example:${{ gitea.sha }} - - name: Update manifest and Push to Git + - name: Update manifest and Push to Git run: | # 使用 kustomize 或 sed 修改镜像版本 sed -i "s|image: .*:.*|image: localhost:8180/go-example/go-example:${{ gitea.sha }}|g" deployment.yaml - + # 配置 Git 并提交回仓库 git config --global user.name "Gitea Action" git config --global user.email "action@gitea.io" git add deployment.yaml git commit -m "chore: update image to ${{ gitea.sha }} [skip ci]" git push origin main - - run: echo "🍏 This job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "🍏 This job's status is ${{ job.status }}."