Skip to content

Commit 1a853dc

Browse files
install.sh
1 parent 8537d2c commit 1a853dc

4 files changed

Lines changed: 44 additions & 2 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Upload install.sh
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- install.sh
8+
9+
jobs:
10+
upload:
11+
name: Upload to Bunny Storage
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Upload install.sh
16+
env:
17+
BUNNYNET_STORAGE_ENDPOINT: ${{ vars.BUNNYNET_STORAGE_ENDPOINT }}
18+
BUNNYNET_STORAGE_ZONE: ${{ vars.BUNNYNET_STORAGE_ZONE }}
19+
BUNNYNET_STORAGE_PASSWORD: ${{ secrets.BUNNYNET_STORAGE_PASSWORD }}
20+
run: |
21+
CHECKSUM=$(sha256sum install.sh | awk '{print toupper($1)}')
22+
curl --fail --show-error --silent \
23+
-X PUT \
24+
-H "AccessKey: ${BUNNYNET_STORAGE_PASSWORD}" \
25+
-H "Content-Type: application/x-sh" \
26+
-H "Checksum: ${CHECKSUM}" \
27+
--upload-file install.sh \
28+
"https://${BUNNYNET_STORAGE_ENDPOINT}/${BUNNYNET_STORAGE_ZONE}/install.sh"
29+
- name: Purge CDN cache
30+
env:
31+
BUNNYNET_API_KEY: ${{ secrets.BUNNYNET_API_KEY }}
32+
BUNNYNET_INSTALL_URL: ${{ vars.BUNNYNET_INSTALL_URL }}
33+
run: |
34+
curl --fail --show-error --silent \
35+
-X POST \
36+
-H "AccessKey: ${BUNNYNET_API_KEY}" \
37+
--data-urlencode "url=${BUNNYNET_INSTALL_URL}" \
38+
-G "https://api.bunny.net/purge"

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ The CLI is distributed through three channels:
646646
**1. Shell installer (standalone binary)**
647647

648648
```bash
649-
curl -fsSL https://bunny.net/cli | sh
649+
curl -fsSL https://cli.bunny.net/install.sh | sh
650650
```
651651

652652
Downloads the prebuilt binary for the current platform from GitHub Releases and installs to `/usr/local/bin`. Supports `BUNNY_INSTALL_DIR` env var for custom paths. Script is at `install.sh` in the repo root.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See each package's README for usage and API documentation.
2020

2121
```bash
2222
# Shell installer (downloads prebuilt binary)
23-
curl -fsSL https://bunny.net/cli | sh
23+
curl -fsSL https://cli.bunny.net/install.sh | sh
2424

2525
# Or via npm
2626
npm install -g @bunny.net/cli

packages/cli/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Command-line interface for [bunny.net](https://bunny.net) — manage databases,
55
## Installation
66

77
```bash
8+
# Shell installer (downloads prebuilt binary)
9+
curl -fsSL https://cli.bunny.net/install.sh | sh
10+
11+
# Or via npm
812
npm install -g @bunny.net/cli
913
```
1014

0 commit comments

Comments
 (0)