From efe2b34116e0634ee1f94aa612d111827dd0ffb4 Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 11 May 2026 19:03:07 +0200 Subject: [PATCH] bootstrap --- .gitea/workflows/ci.yaml | 37 +++++++++++++++++++++++++++++++++++++ Dockerfile | 14 ++++++++++++++ Makefile | 6 ++++++ README.md | 3 +++ go.mod | 3 +++ renovate.json | 11 +++++++++++ 6 files changed, 74 insertions(+) create mode 100644 .gitea/workflows/ci.yaml create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 go.mod create mode 100644 renovate.json diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..a910bf1 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,37 @@ +name: CI +on: + pull_request: + +env: + GOPATH: /go_path + GOCACHE: /go_cache + RUNNER_TOOL_CACHE: /toolcache + +jobs: + test: + name: test + runs-on: + - ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Setup go + uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6 + with: + go-version-file: go.mod + check-latest: true + - name: Create cache key + id: hash-go + run: echo "hash=$(sha256sum go.mod go.sum | sha256sum | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" + - name: cache go + id: cache-go + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 + with: + path: | + /go_path + /go_cache + key: go_path-${{ steps.hash-go.outputs.hash }} + restore-keys: |- + go_cache-${{ steps.hash-go.outputs.hash }} + - name: build + run: make build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..be65e9c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM docker.io/library/golang:1.25-alpine@sha256:04d017a27c481185c169884328a5761d052910fdced8c3b8edd686474efdf59b AS build + +ARG GOARCH=amd64 + +WORKDIR /app +COPY go.mod go.sum ./ +RUN go mod download +COPY . . +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} \ + go build -trimpath -ldflags="-s -w" -o main . + +FROM gcr.io/distroless/static-debian12@sha256:20bc6c0bc4d625a22a8fde3e55f6515709b32055ef8fb9cfbddaa06d1760f838 +COPY --from=build /app/main / +CMD ["/main"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c5404c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +build: + go build + +run: + make build + ./main diff --git a/README.md b/README.md index 041ee83..0ea4c10 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # authentik-kubernetes-operator +Authentik Kubernetes Operator allows to manage Authentik resources directly in Kubernetes using Custom Kubernetes Resources. + +## Features diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..949962d --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module gitea.t000-n.de/t.behrendt/authentik-kubernetes-operator + +go 1.26.3 diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..6bc79f2 --- /dev/null +++ b/renovate.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["local>t.behrendt/renovate-configs:action"], + "packageRules": [ + { + "matchPackageNames": ["golang", "gomod", "go"], + "groupName": "go version", + "matchUpdateTypes": ["major", "minor", "patch"] + } + ] +}