![gcp-cherry-pick-bot[bot]](/assets/img/avatar_default.png)
ci: fix broken cache (#14725) * ci: fix broken cache * fix commit hash --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: Jens L. <jens@goauthentik.io>
63 lines
2.0 KiB
YAML
63 lines
2.0 KiB
YAML
name: "Setup authentik testing environment"
|
|
description: "Setup authentik testing environment"
|
|
|
|
inputs:
|
|
postgresql_version:
|
|
description: "Optional postgresql image tag"
|
|
default: "16"
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install apt deps
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --no-install-recommends -y libpq-dev openssl libxmlsec1-dev pkg-config gettext libkrb5-dev krb5-kdc krb5-user krb5-admin-server
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
- name: Setup python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
- name: Install Python deps
|
|
shell: bash
|
|
run: uv sync --all-extras --dev --frozen
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: web/package.json
|
|
cache: "npm"
|
|
cache-dependency-path: web/package-lock.json
|
|
- name: Setup go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
- name: Setup docker cache
|
|
uses: AndreKurait/docker-cache@0fe76702a40db986d9663c24954fc14c6a6031b7
|
|
with:
|
|
key: docker-images-${{ runner.os }}-${{ hashFiles('.github/actions/setup/docker-compose.yml', 'Makefile') }}-${{ inputs.postgresql_version }}
|
|
- name: Setup dependencies
|
|
shell: bash
|
|
run: |
|
|
export PSQL_TAG=${{ inputs.postgresql_version }}
|
|
docker compose -f .github/actions/setup/docker-compose.yml up -d
|
|
cd web && npm ci
|
|
- name: Generate config
|
|
shell: uv run python {0}
|
|
run: |
|
|
from authentik.lib.generators import generate_id
|
|
from yaml import safe_dump
|
|
|
|
with open("local.env.yml", "w") as _config:
|
|
safe_dump(
|
|
{
|
|
"log_level": "debug",
|
|
"secret_key": generate_id(),
|
|
},
|
|
_config,
|
|
default_flow_style=False,
|
|
)
|