Skip to content

Commit cf865dc

Browse files
committed
Use gh CLI for ziti binary download in CI
1 parent a664511 commit cf865dc

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/CI.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,16 @@ jobs:
128128
CODE_SIGNING_ALLOWED=NO | xcpretty
129129
130130
- name: Install ziti CLI
131+
env:
132+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131133
run: |
132134
set -euo pipefail
133-
ZITI_URL=$(curl -s https://api.github.com/repos/openziti/ziti/releases/latest \
134-
| grep browser_download_url | grep darwin-arm64 | head -1 | cut -d\" -f4)
135-
echo "Downloading $ZITI_URL"
136-
curl -sL "$ZITI_URL" -o /tmp/ziti.tgz
135+
gh release download --repo openziti/ziti \
136+
--pattern '*darwin-arm64*.tar.gz' \
137+
--output /tmp/ziti.tgz
138+
ls -la /tmp/ziti.tgz
139+
# Inspect archive layout (first run proves extraction path is right)
140+
tar -tzf /tmp/ziti.tgz | head -5
137141
sudo tar -xzf /tmp/ziti.tgz -C /usr/local/bin --strip-components=1 ziti/ziti
138142
ziti version
139143

0 commit comments

Comments
 (0)