Compare commits

...

8 Commits

Author SHA1 Message Date
46e6217557 fix
Some checks failed
Build project / build (push) Successful in 1m29s
Publish / build (push) Failing after 1s
2025-06-24 10:52:17 +02:00
36f337434d Tag
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Failing after 1m7s
2025-06-24 10:47:51 +02:00
3f14d82679 Tag
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Failing after 1m11s
2025-06-24 10:42:24 +02:00
1545f05d53 fix tagging
Some checks failed
Build project / build (push) Has been cancelled
2025-06-24 10:35:05 +02:00
47116c70b5 Merge pull request 'ko build --local on main' (#2) from feature/kobuild-on-main into main
All checks were successful
Publish / build (push) Successful in 2m24s
Reviewed-on: #2
2025-06-24 08:24:32 +00:00
0eb5b5c2eb ko build --local on main
All checks were successful
Build project / build (push) Successful in 1m27s
2025-06-24 10:23:55 +02:00
7e6573deb4 Merge pull request 'ko build on main' (#1) from feature/kobuild-on-main into main
All checks were successful
Publish / build (push) Successful in 2m19s
Reviewed-on: #1
2025-06-24 08:15:36 +00:00
e22a4c4992 ko build on main
All checks were successful
Build project / build (push) Successful in 1m27s
2025-06-24 10:14:52 +02:00
2 changed files with 48 additions and 16 deletions

View File

@@ -0,0 +1,26 @@
name: Publish
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container: golang:1.24
steps:
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitea-ssh.engen.priv.no >> ~/.ssh/known_hosts
- name: Install node and go
run: apt update && apt -y install nodejs
- name: Check out repository code
uses: actions/checkout@v4
- name: ssh repo
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=registry.engen.priv.no/unifi-network-operator-controller PATH=~/go/bin:$PATH ko build --local ./cmd

View File

@@ -8,19 +8,25 @@ jobs:
runs-on: ubuntu-latest
container: golang:1.24
steps:
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitea-ssh.engen.priv.no >> ~/.ssh/known_hosts
- name: Install node and go
run: apt update && apt -y install nodejs
- name: Check out repository code
uses: actions/checkout@v4
- name: ssh repo
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=registry.engen.priv.no/unifi-network-operator-controller PATH=~/go/bin:$PATH ko publish ./cmd --tags latest --bare
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan gitea-ssh.engen.priv.no >> ~/.ssh/known_hosts
- name: Install node and go
run: apt update && apt -y install nodejs
- name: Check out repository code
uses: actions/checkout@v4
- name: ssh repo
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: Extract tag
- name: Build
env:
KO_DOCKER_REPO: registry.engen.priv.no/unifi-network-operator-controller
PATH: ~/go/bin:$PATH
run: |
TAG=$(git describe --tags --abbrev=0)
~/go/bin/ko publish ./cmd --tags "$TAG,latest"