mirror of
https://github.com/gaoyifan/china-operator-ip.git
synced 2025-12-16 14:23:18 +08:00
use github personal access tokens for CI deploy
This commit is contained in:
14
upload.sh
14
upload.sh
@@ -1,6 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
git remote set-url origin "https://${GITHUB_USERNAME}:${GITHUB_PASSWORD}@github.com/gaoyifan/china-operator-ip.git"
|
git config user.name $GIT_USER_NAME
|
||||||
git add result
|
git config user.email $GIT_USER_EMAIL
|
||||||
git commit -m "update `date +%Y-%m-%d`"
|
|
||||||
git push origin $(git rev-parse HEAD):${TRAVIS_BRANCH}
|
git clone -b ip-lists https://${GH_REF} ip-lists
|
||||||
|
mv result/* ip-lists
|
||||||
|
cd ip-lists
|
||||||
|
git add .
|
||||||
|
git commit -m "update $(date +%Y-%m-%d)"
|
||||||
|
git push -q "https://${GH_TOKEN}@${GH_REF}" ip-lists:ip-lists
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user