diff --git a/.forgejo/workflows/docker.yaml b/.forgejo/workflows/docker.yaml new file mode 100644 index 0000000..14c8395 --- /dev/null +++ b/.forgejo/workflows/docker.yaml @@ -0,0 +1,20 @@ +on: + push: + branches: + - main + +jobs: + build: + runs-on: docker + container: + image: ubuntu:24.04 + steps: + - name: Install dependencies + run: apt-get update -q && apt-get install -qy git nodejs buildah + + - uses: actions/checkout@v4 + + - name: Build and push Docker image + run: | + buildah build -t kalendasz:latest + buildah push --creds ${{ gitea.actor }}:${{ secrets.PUSH_PACKAGES_KEY }} kalendasz:latest "docker://git.hswro.org/kosma/kalendasz:latest" diff --git a/.gitignore b/.gitignore index 5b6b072..10badd2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ config.yaml +/venv/ diff --git a/app.py b/app.py index a2a25e5..890c0c6 100644 --- a/app.py +++ b/app.py @@ -2,6 +2,7 @@ import argparse import base64 import json import secrets +from urllib.parse import urlencode import yaml from cryptography.hazmat.primitives import serialization @@ -46,8 +47,7 @@ def authorize(): "nonce": nonce, "public_key": public_key, } - query = "&".join(f"{k}={v}" for k, v in params.items()) - return redirect(f"{config['forum_url']}/user-api-key/new?{query}") + return redirect(f"{config['forum_url']}/user-api-key/new?{urlencode(params)}") @app.route("/callback")