mirror of
https://github.com/FutaGuard/LowTechFilter.git
synced 2025-06-21 05:21:02 +08:00
commit
f058e5c19a
20
.github/workflows/auto_newversion.yml
vendored
20
.github/workflows/auto_newversion.yml
vendored
@ -4,11 +4,10 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- "**.txt"
|
||||
- "AutoBuild/pure_domain.py"
|
||||
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
@ -19,12 +18,19 @@ jobs:
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Run AutoBuild
|
||||
run: |
|
||||
cd ${{ github.workspace }}/AutoBuild
|
||||
python pure_domain.py
|
||||
|
||||
- id: files
|
||||
uses: jitterbit/get-changed-files@v1
|
||||
with:
|
||||
format: "csv"
|
||||
- run: |
|
||||
cd AutoBuild
|
||||
|
||||
- name: Run AutoUpdateVerNum
|
||||
run: |
|
||||
cd ${{ github.workspace }}/AutoBuild
|
||||
mapfile -d ',' -t added_modified_files < <(printf '%s,' '${{ steps.files.outputs.added_modified }}')
|
||||
for added_modified_file in "${added_modified_files[@]}"; do
|
||||
python auto_update_version.py ${added_modified_file}
|
||||
@ -34,7 +40,13 @@ jobs:
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add domains.txt
|
||||
git commit -m "🤖 自動更新 domains.txt" || echo "[INFO] Fail to commit domains.txt, may not need to update the file?"
|
||||
git add *.txt
|
||||
git commit -m "🤖 自動更新 版本號"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ github.ref }}
|
||||
|
44
.github/workflows/pure_domain.yml
vendored
44
.github/workflows/pure_domain.yml
vendored
@ -1,44 +0,0 @@
|
||||
name: PureDomain
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- "hosts.txt"
|
||||
- "AutoBuild/pure_domain.py"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Wait for auto new version finished
|
||||
uses: lewagon/wait-on-check-action@v1.0.0
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
running-workflow-name: "Auto Update Version"
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
allowed-conclusions: success,skipped,cancelled
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Run AutoBuild
|
||||
run: |
|
||||
git pull
|
||||
cd AutoBuild
|
||||
python pure_domain.py
|
||||
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git add domains.txt
|
||||
git commit -m "🤖 自動更新 domains.txt"
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
@ -1,7 +1,7 @@
|
||||
! FutaHosts
|
||||
! LowTechFilter Host
|
||||
! URL: <https://github.com/FutaGuard/LowTechFilter>
|
||||
! Version: 2022.0831.9
|
||||
! Version: 2022.0831.10
|
||||
! --------------------------------------------------
|
||||
! 白清單
|
||||
@@||ip2location.com^
|
||||
@ -209,5 +209,3 @@
|
||||
/tw\S{2}gov\.com/
|
||||
/\S{3}gov\.(com|tv|me|top)/
|
||||
/butie\S+\.(shop|xyz)/
|
||||
|
||||
! action test flag
|
Loading…
x
Reference in New Issue
Block a user