feat(ci): set specific tags for images
Some checks failed
functions / build (push) Failing after 1m28s

This commit is contained in:
Peter 2025-01-17 13:06:57 +01:00
parent 95d08e57ce
commit be35a786a9
Signed by: prskr
GPG key ID: F56BED6903BC5E37
5 changed files with 27 additions and 5 deletions

View file

@ -39,9 +39,17 @@ jobs:
- name: Build
run: |
spin registry push --build code.icb4dc0.de/infrastructure/functions/comics
spin registry push --build code.icb4dc0.de/infrastructure/functions/comics:${{ github.sha }}
working-directory: comics
- name: Update image reference
run: |
kustomize edit set image comics=code.icb4dc0.de/infrastructure/functions/comics:${{ github.sha }}
git add kustomization.yaml
git commit -m "chore(deploy): update comics image reference"
git push
working-directory: deploy
- name: Upsert Argo App
run: |
argocd app create functions -f deploy/argo-app.yaml --upsert --server argo-cd-argocd-server.argo-system.svc --auth-token ${{ secrets.ARGOCD_TOKEN }} --plaintext

View file

@ -21,8 +21,9 @@ type MonkeyUserEntry struct {
URL string `json:"url"`
}
type ImageReference struct {
URL string `json:"url"`
type Comic struct {
Title string `json:"title"`
URL string `json:"url"`
}
func init() {
@ -84,7 +85,9 @@ func monkeyUserComic(w http.ResponseWriter, re *http.Request, _ httprouter.Param
return
}
var ref ImageReference
ref := Comic{
Title: entry.Title,
}
comicDoc.Find("div.content > p > img").Each(func(_ int, s *goquery.Selection) {
for _, node := range s.Nodes {

View file

@ -3,6 +3,6 @@ kind: SpinApp
metadata:
name: comics
spec:
image: "code.icb4dc0.de/infrastructure/functions/comics:latest"
image: "comics"
executor: containerd-shim-spin
replicas: 2

View file

@ -3,8 +3,16 @@ kind: Kustomization
namespace: functions
images:
- name: comics
newName: code.icb4dc0.de/infrastructure/functions/comics
newTag: latest
resources:
- resources/namespace.yaml
- resources/executor.yaml
- resources/routes.yaml
- apps/comics.yaml
configurations:
- kustomizeconfig/spinapp.yaml

View file

@ -0,0 +1,3 @@
images:
- path: spec/image
kind: SpinApp