mirror of
https://github.com/gfwlist/gfwlist.git
synced 2025-04-04 15:55:24 +00:00
Merge b964f8e8a3
into 0c9520d402
This commit is contained in:
commit
35d82bbe41
54
.github/workflows/sendGFWList.yml
vendored
Normal file
54
.github/workflows/sendGFWList.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
name: send GFWList
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'list.txt'
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
convert-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'true'
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y file git openssl perl
|
||||
|
||||
- name: Sanity check.
|
||||
run: |
|
||||
for cmd in date file git openssl perl; do
|
||||
command -v $cmd >/dev/null 2>&1 || { echo "Error: You must have $cmd command installed!"; exit 1; }
|
||||
done
|
||||
|
||||
- name: update date and checksum
|
||||
run: |
|
||||
cp apollyon/* ./
|
||||
perl addChecksum.pl list.txt || { echo "Error: Failed to update checksum"; exit 1; }
|
||||
if [ "$(file -b list.txt | grep -o "ASCII text")" != "ASCII text" ]; then
|
||||
echo "Error: list.txt invalid, please make sure:"
|
||||
echo "1. there is no non-ASCII characters;"
|
||||
echo "2. configure your text editor to use unix style line break."
|
||||
exit 1
|
||||
fi
|
||||
echo "DATE=$(date)" >> $GITHUB_ENV
|
||||
|
||||
- name: convert to gfwlist.txt
|
||||
run: |
|
||||
openssl base64 -in list.txt | tr -d '\r' > gfwlist.txt
|
||||
|
||||
- name: save local changes to git & svn
|
||||
id: auto-commit-action
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: gfwlist edited ${{ env.DATE }}
|
||||
file_pattern: 'gfwlist.txt'
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
list.txt
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "apollyon"]
|
||||
path = apollyon
|
||||
url = https://github.com/gfwlist/apollyon
|
1
apollyon
Submodule
1
apollyon
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit caf685e7eda2a54d85ae2b18c50aecff8b04f3b1
|
Loading…
Reference in New Issue
Block a user