Compare commits

..

6 Commits

Author SHA1 Message Date
13cb024c6d Build tag only on tag, build latest on merge to main
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Successful in 3m23s
2025-06-27 01:13:55 +02:00
f406d470c1 Delete before put latest manifest
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Successful in 3m30s
2025-06-27 01:05:16 +02:00
7d52648e2e Fix workflow
All checks were successful
Publish / build (push) Successful in 3m18s
Build project / build (push) Successful in 1m55s
2025-06-27 00:50:10 +02:00
0146a0bfba Correct manifests with correct image
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Successful in 3m26s
2025-06-27 00:38:20 +02:00
b562c200ba Merge pull request 'split up regex' (#22) from feature/build-alpha-and-beta into main
All checks were successful
Publish / build (push) Successful in 2m53s
Reviewed-on: #22
2025-06-26 22:19:58 +00:00
efeaf521fd Merge pull request 'match alpha and beta tags' (#21) from feature/build-alpha-and-beta into main
All checks were successful
Publish / build (push) Successful in 2m55s
Reviewed-on: #21
2025-06-26 22:08:57 +00:00
2 changed files with 27 additions and 11 deletions

View File

@@ -22,7 +22,28 @@ jobs:
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
- name: Install ko
run: go install github.com/google/ko@latest
- name: Build
run: KO_DOCKER_REPO=gitea.engen.priv.no/unifi-network-operator-controller PATH=~/go/bin:$PATH ko build --local ./cmd
- name: Build manifest
run: make build-installer
- name: Docker login
run: echo "${GITEA_TOKEN}" | docker login "${GITEA_REGISTRY}" --username "${GITEA_USER}" --password-stdin
- name: Build
run: |
export KO_DOCKER_REPO="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller"
ko publish ./cmd \
--tags "latest" \
--image-label 'org.opencontainers.image.authors=Klauvsteinen <vegard@engen.priv.no>' \
--image-label 'org.opencontainers.image.vendor=Klauvsteinen' \
--image-label 'org.opencontainers.image.source=https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator' \
--image-label 'org.opencontainers.image.url=https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator' \
--image-label 'dev.chainguard.package.main=' \
--bare
- name: Build manifest
run: |
make IMG="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller:latest" build-installer
curl -X DELETE \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \
https://gitea.engen.priv.no/api/packages/klauvsteinen/generic/unifi-network-operator/latest/install.yaml
curl -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \
--data-binary @./dist/install.yaml \
https://gitea.engen.priv.no/api/packages/klauvsteinen/generic/unifi-network-operator/latest/install.yaml

View File

@@ -40,7 +40,7 @@ jobs:
run: |
export KO_DOCKER_REPO="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller"
ko publish ./cmd \
--tags "$TAG,latest" \
--tags "$TAG" \
--image-label 'org.opencontainers.image.authors=Klauvsteinen <vegard@engen.priv.no>' \
--image-label 'org.opencontainers.image.vendor=Klauvsteinen' \
--image-label 'org.opencontainers.image.source=https://gitea.engen.priv.no/klauvsteinen/unifi-network-operator' \
@@ -49,12 +49,7 @@ jobs:
--bare
- name: Build manifest
run: |
make build-installer
curl -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \
--data-binary @./dist/install.yaml \
https://gitea.engen.priv.no/api/packages/klauvsteinen/generic/unifi-network-operator/latest/install.yaml
make IMG="${GITEA_REGISTRY}/${GITEA_ORG}/unifi-network-operator-controller:$TAG" build-installer
curl -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/x-yaml" \