Skip to content

Commit 36897d2

Browse files
authored
Merge branch 'yihong0618:master' into master
2 parents 8c6757d + ea11724 commit 36897d2

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/run_data_sync.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ env:
4343
# Dont making this huge, just picking points you needing. https://developers.google.com/maps/documentation/utilities/polylineutility using this tool to making your polyline
4444
IGNORE_POLYLINE: 'ktjrFoemeU~IorGq}DeB'
4545
IGNORE_RANGE: 10 # Unit meter
46+
USE_CLOUDFLARE_WARP: false # If you want to use Cloudflare WARP to bypass network restrictions, set it to `true`. Currently only Garmin needs this.
4647
SAVE_DATA_IN_GITHUB_CACHE: false # if you deploy in the vercel, check the README
4748
DATA_CACHE_PREFIX: 'track_data'
4849
BUILD_GH_PAGES: true # If you do not need GitHub Page please set it to `false`
@@ -78,6 +79,25 @@ jobs:
7879
run: |
7980
pip install -r requirements.txt
8081
82+
- name: Install Cloudflare WARP
83+
if: env.USE_CLOUDFLARE_WARP == 'true'
84+
run: |
85+
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
86+
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
87+
sudo apt-get update && sudo apt-get install -y cloudflare-warp
88+
89+
- name: Connect Cloudflare WARP
90+
if: env.USE_CLOUDFLARE_WARP == 'true'
91+
run: |
92+
warp-cli --accept-tos registration new
93+
warp-cli --accept-tos mode warp
94+
warp-cli --accept-tos connect
95+
sleep 3
96+
echo "WARP status:"
97+
warp-cli --accept-tos status
98+
echo "IP info:"
99+
curl -s https://cloudflare.com/cdn-cgi/trace | grep -E "ip|warp"
100+
81101
- name: Cache Data Files
82102
if: env.SAVE_DATA_IN_GITHUB_CACHE == 'true'
83103
uses: actions/cache@v4
@@ -260,6 +280,11 @@ jobs:
260280
pip install duckdb
261281
python run_page/save_to_parqent.py
262282
283+
- name: Disconnect Cloudflare WARP
284+
if: env.USE_CLOUDFLARE_WARP == 'true'
285+
run: |
286+
warp-cli --accept-tos disconnect
287+
263288
- name: Push new runs
264289
if: env.SAVE_DATA_IN_GITHUB_CACHE != 'true'
265290
run: |

0 commit comments

Comments
 (0)