Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 110f12b49d |
+63
-20
@@ -10,15 +10,48 @@ on:
|
|||||||
- "**/*.go"
|
- "**/*.go"
|
||||||
- "Dockerfile"
|
- "Dockerfile"
|
||||||
- "Makefile"
|
- "Makefile"
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
DOCKER_REGISTRY: gitea.t000-n.de
|
DOCKER_REGISTRY: gitea.t000-n.de
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build_and_push:
|
||||||
|
name: Build and push
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [amd64]
|
||||||
|
runs-on:
|
||||||
|
- ubuntu-latest
|
||||||
|
- linux_${{ matrix.arch }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||||
|
with:
|
||||||
|
registry: ${{ env.DOCKER_REGISTRY }}
|
||||||
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- name: Get Metadata
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||||
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/${{ matrix.arch }}
|
||||||
|
push: true
|
||||||
|
provenance: false
|
||||||
|
build-args: GOARCH=${{ matrix.arch }}
|
||||||
|
tags: |
|
||||||
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-${{ matrix.arch }}
|
||||||
|
|
||||||
create_tag:
|
create_tag:
|
||||||
name: Create tag
|
name: Create tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -40,22 +73,32 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT
|
echo "tag=${{ steps.tag.outputs.new-tag }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build_and_push_image:
|
create_manifest:
|
||||||
needs: create_tag
|
name: Create manifest
|
||||||
uses: https://gitea.t000-n.de/t.behrendt/gitea-workflows/.gitea/workflows/build-container.yaml@0.1.1
|
needs:
|
||||||
with:
|
- build_and_push
|
||||||
registry: gitea.t000-n.de/t.behrendt
|
- create_tag
|
||||||
registry-user: ${{ secrets.REGISTRY_USER }}
|
runs-on: ubuntu-latest
|
||||||
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
|
steps:
|
||||||
repo-name: authentik-kubernetes-operator
|
- name: Checkout
|
||||||
tag: ${{ needs.create_tag.outputs.tag }}
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
deploy:
|
- name: Get Metadata
|
||||||
needs: build_and_push_image
|
id: meta
|
||||||
uses: https://gitea.t000-n.de/t.behrendt/k_deploy_workflows/.gitea/workflows/deploy.yaml@1.1.0
|
run: |
|
||||||
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}' | tr '[:upper:]' '[:lower:]') >> $GITHUB_OUTPUT
|
||||||
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||||
with:
|
with:
|
||||||
k8s_dir: ./k8s
|
registry: ${{ env.DOCKER_REGISTRY }}
|
||||||
namespace: authentik-kubernetes-operator
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
skip_helm_deployment: true
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
skip_shared_secrets_deployment: true
|
|
||||||
secrets: inherit
|
- name: Create manifest
|
||||||
|
run: |
|
||||||
|
docker manifest create ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }} \
|
||||||
|
${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}-amd64
|
||||||
|
|
||||||
|
docker manifest push ${{ env.DOCKER_REGISTRY }}/t.behrendt/${{ steps.meta.outputs.REPO_NAME }}:${{ needs.create_tag.outputs.tag }}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ go 1.26.3
|
|||||||
godebug default=go1.26
|
godebug default=go1.26
|
||||||
|
|
||||||
require (
|
require (
|
||||||
goauthentik.io/api/v3 v3.2026020.16
|
goauthentik.io/api/v3 v3.2026050.0
|
||||||
golang.org/x/time v0.15.0
|
golang.org/x/time v0.15.0
|
||||||
k8s.io/api v0.36.1
|
k8s.io/api v0.36.1
|
||||||
k8s.io/apimachinery v0.36.1
|
k8s.io/apimachinery v0.36.1
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
|||||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||||
goauthentik.io/api/v3 v3.2026020.16 h1:sEqcVRXYSJTYaSdU5PzSEdFUWDqCONm5BeL62F5k+58=
|
goauthentik.io/api/v3 v3.2026020.16 h1:sEqcVRXYSJTYaSdU5PzSEdFUWDqCONm5BeL62F5k+58=
|
||||||
goauthentik.io/api/v3 v3.2026020.16/go.mod h1:82lqAz4jxzl6Cg0YDbhNtvvTG2rm6605ZhdJFnbbsl8=
|
goauthentik.io/api/v3 v3.2026020.16/go.mod h1:82lqAz4jxzl6Cg0YDbhNtvvTG2rm6605ZhdJFnbbsl8=
|
||||||
|
goauthentik.io/api/v3 v3.2026050.0 h1:yRChFww7FXjVZNtUFpRXescL/VAK88u/oRqbhwe/Xfc=
|
||||||
|
goauthentik.io/api/v3 v3.2026050.0/go.mod h1:MC0irkuuJEorS4awXUTBnLR7/sYL6lNL50ELKlbUrAM=
|
||||||
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
|
golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA=
|
||||||
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
|
golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs=
|
||||||
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
|
golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs=
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
---
|
|
||||||
Reference in New Issue
Block a user