Skip to content

Change release name, ask for parallelism, add Xray example #7

Change release name, ask for parallelism, add Xray example

Change release name, ask for parallelism, add Xray example #7

Workflow file for this run

name: Update ECH lists
on:
push:
paths:
- 'get_ech.sh'
schedule:
- cron: '0 0 * * *' # 00:00 UTC
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget jq parallel
bash <(curl -fsSL https://sing-box.app/deb-install.sh)
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run script
run: |
chmod +x get_ech.sh
./get_ech.sh
mkdir data
cp domains_ech.lst data/domains_ech
cp domains_noech.lst data/domains_noech
- name: Compile .SRS files from .JSON
run: |
sing-box rule-set compile domains_ech.json -o domains_ech.srs
sing-box rule-set compile domains_noech.json -o domains_noech.srs
- name: Build ech.dat file
run: |
go run main.go --outputname=ech.dat
- name: Create release and upload assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
no_ech_length=$(wc -l domains_noech.lst | tr ' ' '\n' | head -1)
ech_length=$(wc -l domains_ech.lst | tr ' ' '\n' | head -1)
release_date=$(date +'%d-%m-%y-%H-%M')
gh release create "$release_date" \
amnezia.json \
domains_ech.lst \
domains_ech.srs \
domains_noech.lst \
domains_noech.srs \
domains_noech_dnsmasq.lst \
ech.dat \
--title "$release_date" \
--notes "Доменов с ECH: $ech_length, доменов без ECH: $no_ech_length"