This commit is contained in:
@@ -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 }}."
|
||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||
|
||||
Reference in New Issue
Block a user