diff --git a/.github/workflows/create-srs.yml b/.github/workflows/create-srs.yml index 44b42fa..7a84a32 100644 --- a/.github/workflows/create-srs.yml +++ b/.github/workflows/create-srs.yml @@ -1,34 +1,34 @@ -name: Convert to srs +name: Create srs on: push: - branches: [ "main" ] + branches: [ "main", "srs" ] paths: - .github/workflows/create-srs.yml - # - src/** - # - convert.py + - Categories/** + - Services/** + - src/** + - Sing-box-compile-srs/** # schedule: # - cron: '33 */8 * * *' jobs: - convert-and-release: + compile-and-release: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4.1.7 - - name: Run Plain2srs Docker Container + - name: Compile ruleset srs run: | - docker run --name plain2srs-container \ - -v "${{ github.workspace }}:/workspace" \ - itdoginfo/plain2srs-action:20241216 \ - -i /workspace/Russia/inside-raw.lst \ - -o russia-inside \ - -c - docker cp plain2srs-container:/app/plain2srs/output/russia-inside.srs ${{ github.workspace }}/russia-inside.srs + docker run --rm \ + -v ${{ github.workspace }}/Categories:/app/Categories \ + -v ${{ github.workspace }}/Services:/app/Services \ + -v ${{ github.workspace }}/SRS:/app/SRS \ + itdoginfo/compilesrs:0.1 - name: Release uses: softprops/action-gh-release@v2.1.0 with: - files: "${{ github.workspace }}/russia-inside.srs" + files: "${{ github.workspace }}/SRS/*.srs" tag_name: latest \ No newline at end of file diff --git a/.gitignore b/.gitignore index cfd763d..fd88e43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ antifilter-domains.lst uablacklist-domains.lst -zaboronahelp-domains.lst \ No newline at end of file +zaboronahelp-domains.lst +SRS \ No newline at end of file diff --git a/Dockerfile b/Sing-box-compile-srs/Dockerfile similarity index 63% rename from Dockerfile rename to Sing-box-compile-srs/Dockerfile index 252ba41..3564dde 100644 --- a/Dockerfile +++ b/Sing-box-compile-srs/Dockerfile @@ -10,6 +10,4 @@ COPY compile-srs.py /app/compile-srs.py VOLUME ["/app/Categories", "/app/Services"] -CMD ["python3", "compile-srs.py"] - -# docker run --rm -v ./Categories:/app/Categories -v ./Services:/app/Services -v ./json:/app/json py-sg:1 \ No newline at end of file +CMD ["python3", "compile-srs.py"] \ No newline at end of file diff --git a/compile-srs.py b/Sing-box-compile-srs/compile-srs.py similarity index 100% rename from compile-srs.py rename to Sing-box-compile-srs/compile-srs.py