yao/.github/actions/setup-yao/action.yml
Max 7373b0b6f7 feat(tai): enhance gRPC tunnel functionality and internal host handling
- Introduced ExpandHosts function to parse and expand comma-separated host entries, including special values like "internal" and "localhost".
- Updated gRPC server to utilize the new ExpandHosts function for improved host management.
- Added HostHasInternal function to check for "internal" in host strings, enhancing configuration flexibility.
- Implemented new gRPC endpoints for TaiTunnel registration and forwarding, improving tunnel communication capabilities.
- Refactored authentication logic to include new TaiTunnel endpoints, ensuring proper access control.

Made-with: Cursor
2026-03-12 20:35:17 +08:00

113 lines
2.9 KiB
YAML

name: "Setup Yao Build Environment"
description: "Checkout dependency repos, setup Go toolchain, and install build tools (v1.0.0)"
inputs:
go-version:
description: "Go version to install"
default: "1.25"
repo-kun:
description: "Kun repository (owner/repo)"
required: true
repo-xun:
description: "Xun repository (owner/repo)"
required: true
repo-gou:
description: "Gou repository (owner/repo)"
required: true
checkout-app:
description: "Checkout yao-dev-app (demo application for tests)"
default: "true"
checkout-init:
description: "Checkout yao-init (for Yao server startup in CI)"
default: "false"
apple-private-key:
description: "Apple private key content for OAuth certs (optional)"
default: ""
runs:
using: "composite"
steps:
# -- Dependency repositories --
- name: Checkout Kun
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-kun }}
path: kun
- name: Checkout Xun
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-xun }}
path: xun
- name: Checkout Gou
uses: actions/checkout@v4
with:
repository: ${{ inputs.repo-gou }}
path: gou
- name: Checkout V8Go
uses: actions/checkout@v4
with:
repository: yaoapp/v8go
path: v8go
- name: Unzip libv8
shell: bash
run: |
for file in $(find ./v8go -name "libv8*.zip"); do
dir=$(dirname "$file")
echo "Extracting $file to $dir"
unzip -o -d "$dir" "$file"
rm -rf "$dir/__MACOSX"
done
- name: Checkout Demo App
if: ${{ inputs.checkout-app == 'true' }}
uses: actions/checkout@v4
with:
repository: yaoapp/yao-dev-app
path: app
- name: Checkout Extension
uses: actions/checkout@v4
with:
repository: yaoapp/yao-extensions-dev
path: extension
- name: Checkout yao-init
if: ${{ inputs.checkout-init == 'true' }}
uses: actions/checkout@v4
with:
repository: yaoapp/yao-init
path: yao-init
# -- Move all dependencies to parent directory (Go workspace layout) --
- name: Move Dependencies
shell: bash
run: |
mv kun ../
mv xun ../
mv gou ../
mv v8go ../
[ -d app ] && mv app ../
mv extension ../
[ -d yao-init ] && mv yao-init ../
# -- Setup Apple Private Key (if provided) --
- name: Setup Apple Private Key
if: ${{ inputs.apple-private-key != '' }}
shell: bash
run: |
mkdir -p ../app/openapi/certs/apple
echo "${{ inputs.apple-private-key }}" > ../app/openapi/certs/apple/signin_client_secret_key.p8
# -- Go toolchain --
- name: Setup Go ${{ inputs.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Setup Go Tools
shell: bash
run: make tools