1 Commits

Author SHA1 Message Date
dependabot[bot]
5658cbbeb5 Bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-07 13:07:44 +00:00
2 changed files with 28 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

View File

@@ -1,7 +1,15 @@
from httpx import Client
from pydantic import BaseModel
from pydantic_settings import BaseSettings
class Config(BaseSettings):
class Settings(BaseSettings):
VAULT_HOST: str
VAULT_SECRET_PATH: str
VAULT_TOKEN: str
class Config(BaseModel):
DISCORD_BOT_TOKEN: str
DISCORD_BOT_ID: str
DISCORD_BOT_ACTIVITY: str
@@ -29,4 +37,21 @@ class Config(BaseSettings):
TEMPOLAR_URL: str = "temporal:7233"
config = Config()
def get_config() -> Config:
settings = Settings() # type: ignore
with Client() as client:
response = client.get(
f"https://{settings.VAULT_HOST}/v1/{settings.VAULT_SECRET_PATH}",
headers={
"X-Vault-Token": settings.VAULT_TOKEN,
"Content-Type": "application/json",
},
)
response.raise_for_status()
return Config(**response.json()["data"]["data"])
config = get_config()