mirror of
https://github.com/itdoginfo/allow-domains.git
synced 2026-03-25 18:19:43 +03:00
108 lines
3.0 KiB
YAML
108 lines
3.0 KiB
YAML
name: Create lists
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths:
|
|
- .github/workflows/create-lists.yml
|
|
- Categories/**
|
|
- Services/**
|
|
- src/**
|
|
- convert.py
|
|
schedule:
|
|
- cron: '29 8 * * 1'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
generate-lists:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- name: Cache sing-box
|
|
uses: actions/cache@v5.0.3
|
|
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: |
|
|
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: Cache mihomo
|
|
uses: actions/cache@v5.0.3
|
|
id: cache-mihomo
|
|
with:
|
|
path: /usr/local/bin/mihomo
|
|
key: mihomo-1.19.8
|
|
|
|
- name: Install mihomo
|
|
if: steps.cache-mihomo.outputs.cache-hit != 'true'
|
|
run: |
|
|
wget -qO- https://github.com/MetaCubeX/mihomo/releases/download/v1.19.8/mihomo-linux-amd64-v1.19.8.gz | gunzip > mihomo
|
|
chmod +x mihomo
|
|
sudo mv mihomo /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
|
|
with:
|
|
file: "./Russia/inside-dnsmasq-ipset.lst"
|
|
version: 2.89
|
|
- name: Check Russia/inside-dnsmasq-nfset
|
|
uses: itdoginfo/dnsmasq-action@0.1
|
|
with:
|
|
file: "Russia/inside-dnsmasq-nfset.lst"
|
|
version: 2.89
|
|
- name: Check Russia/outside-dnsmasq-ipset
|
|
uses: itdoginfo/dnsmasq-action@0.1
|
|
with:
|
|
file: "Russia/outside-dnsmasq-ipset.lst"
|
|
version: 2.89
|
|
- name: Check Russia/outside-dnsmasq-nfset
|
|
uses: itdoginfo/dnsmasq-action@0.1
|
|
with:
|
|
file: "Russia/outside-dnsmasq-nfset.lst"
|
|
version: 2.89
|
|
- name: Check Ukraine/inside-dnsmasq-ipset
|
|
uses: itdoginfo/dnsmasq-action@0.1
|
|
with:
|
|
file: "Ukraine/inside-dnsmasq-ipset.lst"
|
|
version: 2.89
|
|
- name: Check Ukraine/inside-dnsmasq-nfset
|
|
uses: itdoginfo/dnsmasq-action@0.1
|
|
with:
|
|
file: "Ukraine/inside-dnsmasq-nfset.lst"
|
|
version: 2.89
|
|
|
|
- name: Push lists
|
|
uses: EndBug/add-and-commit@v9.1.4
|
|
with:
|
|
add: 'Russia Ukraine'
|
|
author_name: GitHub Action
|
|
author_email: githubaction@githubaction.com
|
|
message: 'Update lists'
|
|
push: true
|
|
|
|
- name: Set release tag
|
|
run: echo "TAG_NAME=$(date +'%Y-%m-%d_%H-%M')" >> $GITHUB_ENV
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2.3.2
|
|
with:
|
|
files: |
|
|
${{ github.workspace }}/SRS/*.srs
|
|
${{ github.workspace }}/MRS/*.mrs
|
|
${{ github.workspace }}/DAT/*.dat
|
|
tag_name: ${{ env.TAG_NAME }}
|