32 lines
912 B
YAML
32 lines
912 B
YAML
name: Komodo Setup (throwaway)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- komodo-setup
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
inspect:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Inspect Komodo
|
|
env:
|
|
KOMODO_URL: ${{ secrets.KOMODO_URL }}
|
|
KOMODO_API_KEY: ${{ secrets.KOMODO_API_KEY }}
|
|
KOMODO_API_SECRET: ${{ secrets.KOMODO_API_SECRET }}
|
|
run: |
|
|
set -eu
|
|
KOMODO_URL="${KOMODO_URL%/}"
|
|
api() {
|
|
curl -sS -X POST "${KOMODO_URL}$1" \
|
|
-H 'Content-Type: application/json' \
|
|
-H "x-api-key: ${KOMODO_API_KEY}" \
|
|
-H "x-api-secret: ${KOMODO_API_SECRET}" \
|
|
-d "$2"
|
|
}
|
|
echo "=== ListServers ==="
|
|
api /read/ListServers '{}' | python3 -m json.tool
|
|
echo "=== GetStack qbit-maid ==="
|
|
api /read/GetStack '{"stack":"qbit-maid"}' | python3 -m json.tool
|