diff --git a/.github/workflows/create-lists.yml b/.github/workflows/create-lists.yml index 2c9e9dd..aac2bf1 100644 --- a/.github/workflows/create-lists.yml +++ b/.github/workflows/create-lists.yml @@ -19,19 +19,26 @@ jobs: generate-lists: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4.3.0 - - name: Compile ruleset srs + - uses: actions/checkout@v6.0.2 + + - name: Cache sing-box + uses: actions/cache@v4 + id: cache-singbox + with: + path: /usr/local/bin/sing-box + key: sing-box-1.12.25 + + - name: Install sing-box + if: steps.cache-singbox.outputs.cache-hit != 'true' run: | - docker run --rm \ - -v ${{ github.workspace }}/src:/app/src \ - -v ${{ github.workspace }}/Subnets:/app/Subnets \ - -v ${{ github.workspace }}/Russia:/app/Russia \ - -v ${{ github.workspace }}/Ukraine:/app/Ukraine \ - -v ${{ github.workspace }}/Categories:/app/Categories \ - -v ${{ github.workspace }}/Services:/app/Services \ - -v ${{ github.workspace }}/SRS:/app/SRS \ - -v ${{ github.workspace }}/DAT:/app/DAT \ - itdoginfo/compilesrs:0.1.22 + wget -qO- https://github.com/SagerNet/sing-box/releases/download/v1.12.25/sing-box-1.12.25-linux-amd64.tar.gz | tar xz + sudo mv sing-box-*/sing-box /usr/local/bin/ + + - name: Install Python dependencies + run: pip install -r requirements.txt + + - name: Generate lists + run: python3 convert.py - name: Check Russia/inside-dnsmasq-ipset uses: itdoginfo/dnsmasq-action@0.1 diff --git a/.github/workflows/create-subnets.yml b/.github/workflows/create-subnets.yml index 8362390..0c8c3b5 100644 --- a/.github/workflows/create-subnets.yml +++ b/.github/workflows/create-subnets.yml @@ -16,11 +16,11 @@ jobs: generate-subnet: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4.1.7 + - uses: actions/checkout@v6.0.2 - name: Generate subnets - uses: actions/setup-python@v5.1.0 + uses: actions/setup-python@v6.2.0 with: - python-version: '3.10' + python-version: '3.13' - run: | python get-subnets.py - name: Push subnets diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a9637d8..0000000 --- a/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM ghcr.io/sagernet/sing-box:v1.12.25 AS sing-box - -FROM python:3.12.12-alpine3.23 - -COPY --from=sing-box /usr/local/bin/sing-box /bin/sing-box - -COPY requirements.txt /app/requirements.txt - -RUN pip install --no-cache-dir -r /app/requirements.txt - -WORKDIR /app - -COPY proto/ /app/proto/ -COPY convert.py /app/convert.py - -CMD ["python3", "convert.py"]