-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
3,374 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,16 +8,11 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Builder | ||
uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v4 | ||
with: | ||
path: build | ||
ref: build | ||
version: 9 | ||
- name: Checkout Data | ||
uses: actions/checkout@v4 | ||
with: | ||
path: data | ||
ref: master | ||
- name: Set up S3cmd cli tool | ||
uses: s3-actions/[email protected] | ||
with: | ||
|
@@ -26,22 +21,21 @@ jobs: | |
access_key: ${{ secrets.S3_ACCESS_KEY }} | ||
secret_key: ${{ secrets.S3_SECRET_KEY }} | ||
account_id: ${{ secrets.S3_ACCOUNT_ID }} | ||
- name: Set Timezone | ||
uses: szenius/[email protected] | ||
with: | ||
timezoneLinux: "Asia/Shanghai" | ||
- name: Parse | ||
run: | | ||
s3cmd get s3://openipdb/openipdb.ipdb /tmp/openipdb.ipdb | ||
ls -al /tmp/openipdb.ipdb | ||
cd build | ||
yarn install | ||
yarn build | ||
rm -r ./data | ||
pnpm install | ||
pnpm run build | ||
- name: Push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
cd ./data | ||
cp -r ../build/data/cncity/* ./data/cncity/ | ||
cp -r ../build/data/country/* ./data/country/ | ||
cp -r ../build/data/special/* ./data/special/ | ||
if [ -z "$(git status --porcelain)" ]; then | ||
echo "No changes to the output on this push; exiting." | ||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# 构建工具 | ||
node_modules/ | ||
|
||
# 排除台湾省区划细分 | ||
!data/cncity/710000.txt | ||
data/cncity/7* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "iplist", | ||
"version": "1.0.0", | ||
"scripts": { | ||
"build": "npm run gulp build", | ||
"gulp": "npx --max-old-space-size=8092 gulp --gulpfile src/gulpfile.js --cwd ./", | ||
"test": "npm run gulp test" | ||
}, | ||
"repository": "[email protected]:metowolf/iplist.git", | ||
"author": "metowolf <[email protected]>", | ||
"license": "MIT", | ||
"private": true, | ||
"dependencies": { | ||
"@ipdb/range": "^0.1.1", | ||
"cidr-tools": "^3.0.5", | ||
"glob": "^7.2.3", | ||
"gulp": "^4.0.2", | ||
"gulp-debug": "^4.0.0", | ||
"ipdb": "^0.3.3", | ||
"progress": "^2.0.3", | ||
"through2": "^4.0.2", | ||
"yaml": "^1.10.2" | ||
} | ||
} |
Oops, something went wrong.