-
-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into web/clean-user-interface
* 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
Showing
1,059 changed files
with
27,023 additions
and
19,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ keypairs | |
hass | ||
warmup | ||
ontext | ||
singed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.