ci: change mode #3
Workflow file for this run
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
name: Warp installation test | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- ".github/workflows/warp-test.yaml" | |
jobs: | |
install-warp: | |
# openresolv is not available on ubuntu-24.04 | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Set up WARP | |
run: | | |
sudo apt-get -y update | |
curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg | |
echo "deb [arch=amd64 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 | |
sudo apt-get update | |
sudo apt-get install -y cloudflare-warp | |
- run: sudo warp-cli --accept-tos registration new | |
- run: sudo warp-cli --accept-tos connect | |
- run: sudo warp-cli --accept-tos mode warp | |
- run: | | |
response=$(curl -s https://www.cloudflare.com/cdn-cgi/trace/) | |
echo "$response" | |
if echo "$response" | grep -q "warp=on"; then | |
echo "WARP is enabled" | |
else | |
echo "WARP is not enabled" | |
exit 1 | |
fi |