diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 3fb0d5a..f7c0bfc 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -39,3 +39,20 @@ jobs: -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Content-Type: application/json" \ --data @- + + - name: Trigger Komodo build + env: + KOMODO_WEBHOOK_URL: https://komodo.urania.dev/listener/github/build/urania_builder_nadir + KOMODO_WEBHOOK_SECRET: ${{ secrets.KOMODO_WEBHOOK_SECRET }} + run: | + # Komodo's GitHub listener requires `ref` + a matching HMAC signature. + BODY=$(jq -nc --arg sha "$GITHUB_SHA" \ + '{ref:"refs/heads/main", after:$sha, + repository:{full_name:"${{ github.repository }}", + clone_url:"${{ github.server_url }}/${{ github.repository }}.git"}}') + SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$KOMODO_WEBHOOK_SECRET" -hex | awk '{print $NF}') + curl -fsSL -X POST "$KOMODO_WEBHOOK_URL" \ + -H "Content-Type: application/json" \ + -H "X-GitHub-Event: push" \ + -H "X-Hub-Signature-256: sha256=$SIG" \ + -d "$BODY"