Skip to content

Commit

Permalink
Merge branch 'main' into web/clean-user-interface
Browse files Browse the repository at this point in the history
* main: (331 commits)
  website/docs: installation: kubernetes: fix values (#8783)
  web: bump the wdio group in /tests/wdio with 4 updates (#8789)
  core: bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#8790)
  core: bump twisted from 23.10.0 to 24.3.0 (#8788)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#8778)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#8779)
  root: ensure consistent install_id (#8775)
  web: bump the sentry group in /web with 1 update (#8762)
  web: bump style-mod from 4.1.1 to 4.1.2 in /web (#8763)
  website: bump @types/react from 18.2.60 to 18.2.61 in /website (#8764)
  core: bump goauthentik.io/api/v3 from 3.2024021.2 to 3.2024021.3 (#8765)
  core: bump ruff from 0.2.2 to 0.3.0 (#8766)
  core: bump twilio from 8.13.0 to 9.0.0 (#8767)
  translate: Updates for file locale/en/LC_MESSAGES/django.po in fr (#8774)
  core, web: update translations (#8759)
  web/admin: don't mark LDAP group property mappings as required (#8772)
  website/docs: move Applications docs up a level, other edits (#8712)
  web/admin: don't mark property mappings as required anywhere (#8752)
  website: redirect root to /docs (#8754)
  web: bump API Client version (#8753)
  ...
  • Loading branch information
kensternberg-authentik committed Mar 4, 2024
2 parents c7a0f77 + cd4d648 commit 86a762b
Show file tree
Hide file tree
Showing 1,059 changed files with 27,023 additions and 19,109 deletions.
14 changes: 11 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
[bumpversion]
current_version = 2023.10.6
current_version = 2024.2.1
tag = True
commit = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
serialize = {major}.{minor}.{patch}
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<rc_t>[a-zA-Z-]+)(?P<rc_n>[1-9]\\d*))?
serialize =
{major}.{minor}.{patch}-{rc_t}{rc_n}
{major}.{minor}.{patch}
message = release: {new_version}
tag_name = version/{new_version}

[bumpversion:part:rc_t]
values =
rc
final
optional_value = final

[bumpversion:file:pyproject.toml]

[bumpversion:file:docker-compose.yml]
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: ""
**Describe your question/**
A clear and concise description of what you're trying to do.

**Relevant infos**
**Relevant info**
i.e. Version of other software you're using, specifics of your setup

**Screenshots**
Expand Down
3 changes: 0 additions & 3 deletions .github/actions/comment-pr-instructions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ inputs:
runs:
using: "composite"
steps:
- name: Generate config
id: ev
uses: ./.github/actions/docker-push-variables
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
Expand Down
73 changes: 28 additions & 45 deletions .github/actions/docker-push-variables/action.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,47 @@
---
name: "Prepare docker environment variables"
description: "Prepare docker environment variables"

inputs:
image-name:
required: true
description: "Docker image prefix"
image-arch:
required: false
description: "Docker image arch"

outputs:
shouldBuild:
description: "Whether to build image or not"
value: ${{ steps.ev.outputs.shouldBuild }}
branchName:
description: "Branch name"
value: ${{ steps.ev.outputs.branchName }}
branchNameContainer:
description: "Branch name (for containers)"
value: ${{ steps.ev.outputs.branchNameContainer }}
timestamp:
description: "Timestamp"
value: ${{ steps.ev.outputs.timestamp }}

sha:
description: "sha"
value: ${{ steps.ev.outputs.sha }}
shortHash:
description: "shortHash"
value: ${{ steps.ev.outputs.shortHash }}

version:
description: "version"
description: "Version"
value: ${{ steps.ev.outputs.version }}
versionFamily:
description: "versionFamily"
value: ${{ steps.ev.outputs.versionFamily }}
prerelease:
description: "Prerelease"
value: ${{ steps.ev.outputs.prerelease }}

imageTags:
description: "Docker image tags"
value: ${{ steps.ev.outputs.imageTags }}
imageMainTag:
description: "Docker image main tag"
value: ${{ steps.ev.outputs.imageMainTag }}

runs:
using: "composite"
steps:
- name: Generate config
id: ev
shell: python
shell: bash
env:
IMAGE_NAME: ${{ inputs.image-name }}
IMAGE_ARCH: ${{ inputs.image-arch }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
"""Helper script to get the actual branch name, docker safe"""
import configparser
import os
from time import time
parser = configparser.ConfigParser()
parser.read(".bumpversion.cfg")
branch_name = os.environ["GITHUB_REF"]
if os.environ.get("GITHUB_HEAD_REF", "") != "":
branch_name = os.environ["GITHUB_HEAD_REF"]
should_build = str(os.environ.get("DOCKER_USERNAME", "") != "").lower()
version = parser.get("bumpversion", "current_version")
version_family = ".".join(version.split(".")[:-1])
safe_branch_name = branch_name.replace("refs/heads/", "").replace("/", "-")
sha = os.environ["GITHUB_SHA"] if not "${{ github.event.pull_request.head.sha }}" else "${{ github.event.pull_request.head.sha }}"
with open(os.environ["GITHUB_OUTPUT"], "a+", encoding="utf-8") as _output:
print("branchName=%s" % branch_name, file=_output)
print("branchNameContainer=%s" % safe_branch_name, file=_output)
print("timestamp=%s" % int(time()), file=_output)
print("sha=%s" % sha, file=_output)
print("shortHash=%s" % sha[:7], file=_output)
print("shouldBuild=%s" % should_build, file=_output)
print("version=%s" % version, file=_output)
print("versionFamily=%s" % version_family, file=_output)
python3 ${{ github.action_path }}/push_vars.py
62 changes: 62 additions & 0 deletions .github/actions/docker-push-variables/push_vars.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""Helper script to get the actual branch name, docker safe"""

import configparser
import os
from time import time

parser = configparser.ConfigParser()
parser.read(".bumpversion.cfg")

should_build = str(os.environ.get("DOCKER_USERNAME", None) is not None).lower()

branch_name = os.environ["GITHUB_REF"]
if os.environ.get("GITHUB_HEAD_REF", "") != "":
branch_name = os.environ["GITHUB_HEAD_REF"]
safe_branch_name = branch_name.replace("refs/heads/", "").replace("/", "-")

image_names = os.getenv("IMAGE_NAME").split(",")
image_arch = os.getenv("IMAGE_ARCH") or None

is_pull_request = bool(os.getenv("PR_HEAD_SHA"))
is_release = "dev" not in image_names[0]

sha = os.environ["GITHUB_SHA"] if not is_pull_request else os.getenv("PR_HEAD_SHA")

# 2042.1.0 or 2042.1.0-rc1
version = parser.get("bumpversion", "current_version")
# 2042.1
version_family = ".".join(version.split("-", 1)[0].split(".")[:-1])
prerelease = "-" in version

image_tags = []
if is_release:
for name in image_names:
image_tags += [
f"{name}:{version}",
]
if not prerelease:
image_tags += [
f"{name}:latest",
f"{name}:{version_family}",
]
else:
suffix = ""
if image_arch and image_arch != "amd64":
suffix = f"-{image_arch}"
for name in image_names:
image_tags += [
f"{name}:gh-{sha}{suffix}", # Used for ArgoCD and PR comments
f"{name}:gh-{safe_branch_name}{suffix}", # For convenience
f"{name}:gh-{safe_branch_name}-{int(time())}-{sha[:7]}{suffix}", # Use by FluxCD
]

image_main_tag = image_tags[0]
image_tags_rendered = ",".join(image_tags)

with open(os.environ["GITHUB_OUTPUT"], "a+", encoding="utf-8") as _output:
print("shouldBuild=%s" % should_build, file=_output)
print("sha=%s" % sha, file=_output)
print("version=%s" % version, file=_output)
print("prerelease=%s" % prerelease, file=_output)
print("imageTags=%s" % image_tags_rendered, file=_output)
print("imageMainTag=%s" % image_main_tag, file=_output)
7 changes: 7 additions & 0 deletions .github/actions/docker-push-variables/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -x
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
GITHUB_OUTPUT=/dev/stdout \
GITHUB_REF=ref \
GITHUB_SHA=sha \
IMAGE_NAME=ghcr.io/goauthentik/server,beryju/authentik \
python $SCRIPT_DIR/push_vars.py
1 change: 1 addition & 0 deletions .github/codespell-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ keypairs
hass
warmup
ontext
singed
1 change: 0 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ If an API change has been made
If changes to the frontend have been made

- [ ] The code has been formatted (`make web`)
- [ ] The translation files have been updated (`make i18n-extract`)

If applicable

Expand Down
Loading

0 comments on commit 86a762b

Please sign in to comment.