Skip to content

Build SingBox Configs #5

Build SingBox Configs

Build SingBox Configs #5

Workflow file for this run

name: Build SingBox Config
on:
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build config via API
run: |
SUB=$(curl -s https://YOUR_SUB_URL | tr -d '\r')
curl -sS -X POST "https://api.web2core.workers.dev/" -H "Content-Type: application/json" --data-binary @- <<EOF > config.json
{
"core": "singbox",
"input": "$SUB",
"options": {
"addTun": true,
"addSocks": true,
"useExtended": false
}
}
EOF
- name: Commit config
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"
git add config.json
git commit -m "auto update config" || exit 0
git push