From ec2bfda1986409749b101ad171fa3f006cc78c41 Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 17 Oct 2026 15:08:48 -0400 Subject: [PATCH] Add secure AzerothAI host operations --- .gitea/workflows/azeroth-ops.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/azeroth-ops.yml diff --git a/.gitea/workflows/azeroth-ops.yml b/.gitea/workflows/azeroth-ops.yml new file mode 100644 index 0000000..93fd712 --- /dev/null +++ b/.gitea/workflows/azeroth-ops.yml @@ -0,0 +1,45 @@ +name: AzerothAI Host Operations + +on: + workflow_dispatch: + inputs: + operation: + description: Approved AzerothAI operation + required: true + default: status + +jobs: + + azeroth: + + runs-on: azerothai-host + + timeout-minutes: 60 + + env: + AZEROTH_OPERATION: ${{ inputs.operation }} + AZEROTH_ACTOR: ${{ gitea.actor }} + AZEROTH_REPOSITORY: ${{ gitea.repository }} + + steps: + + - name: Verify authorized request + shell: bash + run: | + set -euo pipefail + + if [ "$AZEROTH_REPOSITORY" != "richard/AzerothAI" ]; then + echo "Rejected repository: $AZEROTH_REPOSITORY" + exit 1 + fi + + if [ "$AZEROTH_ACTOR" != "richard" ]; then + echo "Rejected actor: $AZEROTH_ACTOR" + exit 1 + fi + + - name: Execute approved operation + shell: bash + run: | + set -euo pipefail + sudo -n /usr/local/bin/azerothai-ops "$AZEROTH_OPERATION"