Compare commits
18 Commits
feature/te
...
v.0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 46e6217557 | |||
| 36f337434d | |||
| 3f14d82679 | |||
| 1545f05d53 | |||
| 47116c70b5 | |||
| 0eb5b5c2eb | |||
| 7e6573deb4 | |||
| e22a4c4992 | |||
| 401f4a7cf7 | |||
| 68e8782da4 | |||
| e95a4c13e6 | |||
| d82d7d2902 | |||
| 3091c89fa8 | |||
| 853fca1635 | |||
| 07208979e3 | |||
| c86196aa88 | |||
| a35bc7220d | |||
| 446fb89d00 |
@@ -1,7 +1,8 @@
|
||||
name: Build & Push Linode Webhook
|
||||
|
||||
name: Build project
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -21,5 +22,3 @@ jobs:
|
||||
run: git config --global url.git@gitea-ssh.engen.priv.no:.insteadOf https://gitea.engen.priv.no/
|
||||
- name: Build
|
||||
run: go build cmd/main.go
|
||||
|
||||
|
||||
26
.gitea/workflows/kobuild.yaml
Normal file
26
.gitea/workflows/kobuild.yaml
Normal 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
|
||||
32
.gitea/workflows/publish.yaml
Normal file
32
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Publish
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||
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: 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"
|
||||
Reference in New Issue
Block a user