Skip to content

Commit 6c4a3a9

Browse files
committed
ci: add fork release workflow for CLI binary and gateway image
1 parent 07aae1a commit 6c4a3a9

1 file changed

Lines changed: 134 additions & 0 deletions

File tree

.github/workflows/release-fork.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Release Fork
2+
3+
on:
4+
push:
5+
branches: [add-credential-injection]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: release-fork-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: write
14+
packages: write
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
19+
jobs:
20+
build-cli:
21+
name: Build CLI (linux-amd64)
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Install Rust stable
30+
uses: dtolnay/rust-toolchain@stable
31+
32+
- name: Install protoc
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y --no-install-recommends protobuf-compiler
36+
protoc --version
37+
38+
- name: Cache cargo registry and build
39+
uses: actions/cache@v4
40+
with:
41+
path: |
42+
~/.cargo/registry
43+
~/.cargo/git
44+
target
45+
key: cargo-cli-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
46+
restore-keys: cargo-cli-${{ runner.os }}-
47+
48+
- name: Build openshell CLI (release)
49+
run: cargo build --release -p openshell-cli
50+
51+
- name: Package binary
52+
run: |
53+
mkdir -p dist
54+
cp target/release/openshell dist/
55+
cd dist
56+
tar czf openshell-linux-amd64.tar.gz openshell
57+
sha256sum openshell-linux-amd64.tar.gz > openshell-linux-amd64.tar.gz.sha256
58+
59+
- name: Upload artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: openshell-linux-amd64
63+
path: |
64+
dist/openshell-linux-amd64.tar.gz
65+
dist/openshell-linux-amd64.tar.gz.sha256
66+
67+
build-gateway:
68+
name: Build gateway Docker image
69+
runs-on: ubuntu-latest
70+
timeout-minutes: 45
71+
steps:
72+
- uses: actions/checkout@v4
73+
with:
74+
fetch-depth: 0
75+
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v3
78+
79+
- name: Log in to GHCR
80+
uses: docker/login-action@v3
81+
with:
82+
registry: ghcr.io
83+
username: ${{ github.actor }}
84+
password: ${{ secrets.GITHUB_TOKEN }}
85+
86+
- name: Build and push gateway image
87+
uses: docker/build-push-action@v6
88+
with:
89+
context: .
90+
file: deploy/docker/Dockerfile.images
91+
target: gateway
92+
platforms: linux/amd64
93+
push: true
94+
tags: |
95+
ghcr.io/htekdev/openshell-gateway:latest
96+
ghcr.io/htekdev/openshell-gateway:${{ github.sha }}
97+
cache-from: type=gha
98+
cache-to: type=gha,mode=max
99+
100+
release:
101+
name: Create GitHub Release
102+
needs: [build-cli]
103+
runs-on: ubuntu-latest
104+
timeout-minutes: 5
105+
steps:
106+
- name: Download CLI artifact
107+
uses: actions/download-artifact@v4
108+
with:
109+
name: openshell-linux-amd64
110+
path: dist/
111+
112+
- name: Create or update release
113+
uses: softprops/action-gh-release@v2
114+
with:
115+
tag_name: fork-latest
116+
name: "Fork Release (credential injection)"
117+
body: |
118+
Pre-built OpenShell fork with L7 credential injection for non-inference providers.
119+
120+
Branch: `add-credential-injection`
121+
Commit: ${{ github.sha }}
122+
123+
**Changes:** Extends the L7 proxy to inject API credentials at the network layer
124+
for arbitrary REST endpoints (Exa AI, Perplexity, YouTube, etc.).
125+
126+
**Gateway image:** `ghcr.io/htekdev/openshell-gateway:latest`
127+
draft: false
128+
prerelease: true
129+
make_latest: false
130+
files: |
131+
dist/openshell-linux-amd64.tar.gz
132+
dist/openshell-linux-amd64.tar.gz.sha256
133+
env:
134+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)