Compare commits

..

31 Commits

Author SHA1 Message Date
Gitea Action
bea436058d chore: update image to 000f34a059 [skip ci] 2026-01-25 13:42:45 +00:00
Zpekii
000f34a059 chore: update deploy.yaml
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m47s
2026-01-25 21:40:55 +08:00
Zpekii
93837e0248 chore: udpate deploy.yaml
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m38s
2026-01-25 21:34:49 +08:00
root
e90fa00227 Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1m40s
2026-01-25 21:27:52 +08:00
root
bd18f32670 chore: update kustomizations 2026-01-25 21:26:44 +08:00
Flux
6e2e0f0ed0 Add Flux sync manifests
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2026-01-25 21:20:17 +08:00
Flux
42becfe8b0 Add Flux v2.7.5 component manifests
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2026-01-25 21:20:12 +08:00
Zpekii
b385dfb0ec chore: rm flux [skip ci] 2026-01-25 21:17:05 +08:00
Zpekii
925e346df3 chore: delete flux kustomizations [skip ci] 2026-01-25 21:16:43 +08:00
Flux
3b1c6f4ee9 Add Flux sync manifests
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 33m43s
2026-01-25 20:38:45 +08:00
Flux
e4364224bd Add Flux v2.7.5 component manifests
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
2026-01-25 20:38:40 +08:00
Gitea Action
1db170150f chore: update image to 8b5d44399e [skip ci] 2026-01-25 12:25:50 +00:00
Zpekii
8b5d44399e Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m34s
2026-01-25 20:24:15 +08:00
Zpekii
062b40cf13 ci: update kustomization 2026-01-25 20:24:12 +08:00
Gitea Action
f130badb33 chore: update image to 4c748b20e3 [skip ci] 2026-01-25 10:04:51 +00:00
Zpekii
4c748b20e3 Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m47s
2026-01-25 18:03:01 +08:00
Zpekii
8714af1ed6 chore: update kustomization 2026-01-25 18:02:59 +08:00
Gitea Action
ac450cfa29 chore: update image to 76a838ef4f [skip ci] 2026-01-25 09:58:43 +00:00
Zpekii
76a838ef4f chore: comment golangci-lint
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1m43s
2026-01-25 17:56:57 +08:00
Zpekii
876b4ed497 Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 13m51s
2026-01-25 17:38:05 +08:00
Zpekii
4e1822bafa chore: update flux kustomization 2026-01-25 17:37:59 +08:00
Gitea Action
212099a265 chore: update image to 8edf753f47 [skip ci] 2026-01-25 09:34:15 +00:00
Zpekii
8edf753f47 Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7m15s
2026-01-25 17:26:58 +08:00
Zpekii
50aad7aaed chore: update kustomization 2026-01-25 17:26:56 +08:00
Gitea Action
54346e072d chore: update image to 4154c807b1 [skip ci] 2026-01-25 09:19:14 +00:00
root
4154c807b1 chore: update flux
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m32s
2026-01-25 17:16:32 +08:00
root
0b9e58896f chore: add go-example kustomization [skip ci] 2026-01-25 17:12:44 +08:00
Gitea Action
f61941608b chore: update image to 2ea535146f [skip ci] 2026-01-25 08:43:05 +00:00
Zpekii
2ea535146f Merge branch 'main' of https://git.0orz.top/Zpekii/go-example
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2m51s
2026-01-25 16:40:13 +08:00
Zpekii
9694ae0289 chore: edit request resources 2026-01-25 16:40:11 +08:00
Gitea Action
6f4be9695f chore: update image to 05e25ab63e [skip ci] 2026-01-25 08:24:11 +00:00
9 changed files with 52 additions and 17 deletions

View File

@@ -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 }}."

12
clusters/app/flux-deploy.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
USER_NAME=Zpekii
BRANCH=main
URL=https://git.0orz.top/Zpekii/go-example.git
flux bootstrap git \
--url=$URL \
--branch=$BRANCH \
--username=$USER_NAME \
--token-auth=true \
--path=./clusters/app

View File

@@ -20,7 +20,7 @@ metadata:
namespace: flux-system
spec:
interval: 10m0s
path: ./
path: ./clusters/app
prune: true
sourceRef:
kind: GitRepository

View File

@@ -0,0 +1,17 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: go-example
namespace: flux-system
spec:
interval: 30m0s
path: ./kustomize
prune: true
retryInterval: 2m0s
sourceRef:
kind: GitRepository
name: go-example
targetNamespace: helloapp
timeout: 3m0s
wait: true

View File

@@ -0,0 +1,11 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: GitRepository
metadata:
name: go-example
namespace: flux-system
spec:
interval: 1m0s
ref:
branch: main
url: https://git.0orz.top/Zpekii/go-example

View File

@@ -1,5 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- flux-system/

View File

@@ -33,15 +33,15 @@ spec:
spec:
containers:
- name: go-example
image: harbor.0orz.top/go-example/go-example:d21cd672a64eab6dc9de6c0a14230528ff2b6af1
image: harbor.0orz.top/go-example/go-example:000f34a0591306e686e8cf06bf131449eb30b028
imagePullPolicy: IfNotPresent
resources:
requests:
memory: "128Mi"
cpu: "500m"
memory: "5Mi"
cpu: "10m"
limits:
memory: "128Mi"
cpu: "500m"
memory: "50Mi"
cpu: "100m"
ports:
- containerPort: 8800
volumeMounts: