Compare commits
22 Commits
8edf753f47
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bea436058d | ||
|
|
000f34a059 | ||
|
|
93837e0248 | ||
|
|
e90fa00227 | ||
|
|
bd18f32670 | ||
|
|
6e2e0f0ed0 | ||
|
|
42becfe8b0 | ||
|
|
b385dfb0ec | ||
|
|
925e346df3 | ||
|
|
3b1c6f4ee9 | ||
|
|
e4364224bd | ||
|
|
1db170150f | ||
|
|
8b5d44399e | ||
|
|
062b40cf13 | ||
|
|
f130badb33 | ||
|
|
4c748b20e3 | ||
|
|
8714af1ed6 | ||
|
|
ac450cfa29 | ||
|
|
76a838ef4f | ||
|
|
876b4ed497 | ||
|
|
4e1822bafa | ||
|
|
212099a265 |
@@ -30,10 +30,10 @@ jobs:
|
||||
- name: Check go version
|
||||
run: |
|
||||
go version
|
||||
- name: Run golangci-lint
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
golangci-lint run ./...
|
||||
# - name: Run golangci-lint
|
||||
# run: |
|
||||
# cd ${{ gitea.workspace }}
|
||||
# golangci-lint run ./...
|
||||
- name: Tests
|
||||
run: |
|
||||
cd ${{ gitea.workspace }}
|
||||
@@ -59,12 +59,12 @@ jobs:
|
||||
- name: Update manifest and Push to Git
|
||||
run: |
|
||||
# 使用 kustomize 或 sed 修改镜像版本
|
||||
sed -i "s|image: .*:.*|image: harbor.0orz.top/go-example/go-example:${{ gitea.sha }}|g" deployment.yaml
|
||||
sed -i "s|image: .*:.*|image: harbor.0orz.top/go-example/go-example:${{ gitea.sha }}|g" kustomize/deployment.yaml
|
||||
|
||||
# 配置 Git 并提交回仓库
|
||||
git config --global user.name "Gitea Action"
|
||||
git config --global user.email "action@gitea.io"
|
||||
git add deployment.yaml
|
||||
git add kustomize/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 }}."
|
||||
|
||||
@@ -9,4 +9,4 @@ flux bootstrap git \
|
||||
--branch=$BRANCH \
|
||||
--username=$USER_NAME \
|
||||
--token-auth=true \
|
||||
--path=./
|
||||
--path=./clusters/app
|
||||
|
||||
@@ -20,7 +20,7 @@ metadata:
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 10m0s
|
||||
path: ./
|
||||
path: ./clusters/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
|
||||
@@ -6,7 +6,7 @@ metadata:
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 30m0s
|
||||
path: ./
|
||||
path: ./kustomize
|
||||
prune: true
|
||||
retryInterval: 2m0s
|
||||
sourceRef:
|
||||
|
||||
@@ -5,7 +5,7 @@ metadata:
|
||||
name: go-example
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 3m0s
|
||||
interval: 1m0s
|
||||
ref:
|
||||
branch: main
|
||||
url: https://git.0orz.top/Zpekii/go-example.git
|
||||
url: https://git.0orz.top/Zpekii/go-example
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- clusters/app/go-example-source.yaml
|
||||
- clusters/app/go-example-kustomization.yaml
|
||||
- clusters/app/flux-system/
|
||||
@@ -33,7 +33,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: go-example
|
||||
image: harbor.0orz.top/go-example/go-example:4154c807b196e7758c24b23ef5fcc58df22db41a
|
||||
image: harbor.0orz.top/go-example/go-example:000f34a0591306e686e8cf06bf131449eb30b028
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
requests:
|
||||
Reference in New Issue
Block a user