Files
unifi-network-operator/.gitea/workflows/publish.yaml
Vegard Engen 481091160b
Some checks failed
Build project / build (push) Has been cancelled
Publish / build (push) Failing after 1m6s
fix
2025-06-24 11:58:06 +02:00

36 lines
1.1 KiB
YAML

name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
container: golang:1.24-bookworm
steps:
- name: Install dependencies
run: apt update && apt -y install nodejs bash
- 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: 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 (outside container)
shell: bash
run: |
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
env
- name: Build
env:
KO_DOCKER_REPO: registry.engen.priv.no/unifi-network-operator-controller
PATH: ~/go/bin:$PATH
run: |
ko publish ./cmd --tags "$TAG,latest"