This commit is contained in:
@@ -48,16 +48,16 @@ jobs:
|
||||
V2RAY_JSON: ${{ secrets.V2RAY_JSON }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "$V2RAY_JSON" > "${GITHUB_WORKSPACE}/v2ray-client.json"
|
||||
jq . "${GITHUB_WORKSPACE}/v2ray-client.json" >/dev/null # 可选,校验 JSON
|
||||
ls -l "${GITHUB_WORKSPACE}/v2ray-client.json"
|
||||
mkdir -p "${GITHUB_WORKSPACE}/v2ray"
|
||||
printf '%s' "$V2RAY_JSON" > "${GITHUB_WORKSPACE}/v2ray/config.json"
|
||||
jq . "${GITHUB_WORKSPACE}/v2ray/config.json" >/dev/null
|
||||
|
||||
- name: Start v2ray-client
|
||||
run: |
|
||||
docker rm -f v2ray-client >/dev/null 2>&1 || true
|
||||
docker run -d --name v2ray-client \
|
||||
--network host \
|
||||
-v ${{ github.workspace }}/v2ray-client.json:/etc/v2ray/config.json:ro \
|
||||
-v ${{ github.workspace }}/v2ray:/etc/v2ray:ro \
|
||||
v2fly/v2fly-core:latest \
|
||||
run -c /etc/v2ray/config.json
|
||||
|
||||
|
||||
Reference in New Issue
Block a user