Skip to content

Commit 9e5ba0a

Browse files
authored
feat(agent-install): publish installer scripts to repo.roboflow.com/agent-install (#18)
Adds the agent-install/ directory plus a GitHub Actions workflow that publishes agent.sh and agent.ps1 to https://repo.roboflow.com/agent-install/ on every push to main that touches agent-install/. The workflow authenticates via Workload Identity Federation as a per-repo service account that holds a single bucket-scoped roles/storage.objectCreator binding — write-only, no read, no list, no delete, no permissions on any other resource. A compromised workflow can replace these two installer scripts and nothing else. The shipped scripts are placeholders; real install logic will follow in a subsequent PR.
1 parent 9261ed5 commit 9e5ba0a

3 files changed

Lines changed: 91 additions & 0 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Publish agent-install
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "agent-install/**"
8+
- ".github/workflows/publish-agent-install.yml"
9+
workflow_dispatch: {}
10+
11+
# Least-privilege at the workflow level. id-token is required for WIF;
12+
# contents: read is enough for actions/checkout.
13+
permissions:
14+
contents: read
15+
id-token: write
16+
17+
# One publish at a time, never cancel an in-flight upload.
18+
concurrency:
19+
group: publish-agent-install
20+
cancel-in-progress: false
21+
22+
jobs:
23+
publish:
24+
runs-on: ubuntu-latest
25+
# Requiring an environment lets us add manual approval / restrict to main
26+
# via the repo's environment protection rules without touching this file.
27+
environment: agent-install-prod
28+
env:
29+
BUCKET_NAME: roboflow-platform-agent-install
30+
PROJECT: roboflow-platform
31+
OIDC_PROJECT_ID: "481589474394"
32+
SERVICE_ACCOUNT: gha-computer-vision-skills
33+
WIF_POOL_ID: github-actions
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
persist-credentials: false
39+
40+
- name: Authenticate to Google Cloud
41+
uses: google-github-actions/auth@v3
42+
with:
43+
workload_identity_provider: projects/${{ env.OIDC_PROJECT_ID }}/locations/global/workloadIdentityPools/${{ env.WIF_POOL_ID }}/providers/github
44+
service_account: ${{ env.SERVICE_ACCOUNT }}@${{ env.PROJECT }}.iam.gserviceaccount.com
45+
46+
- name: Upload agent.sh
47+
uses: google-github-actions/upload-cloud-storage@v3
48+
with:
49+
parent: false
50+
path: agent-install/agent.sh
51+
destination: ${{ env.BUCKET_NAME }}/
52+
process_gcloudignore: false
53+
headers: |-
54+
content-type: text/x-shellscript; charset=utf-8
55+
cache-control: no-cache, max-age=0
56+
57+
- name: Upload agent.ps1
58+
uses: google-github-actions/upload-cloud-storage@v3
59+
with:
60+
parent: false
61+
path: agent-install/agent.ps1
62+
destination: ${{ env.BUCKET_NAME }}/
63+
process_gcloudignore: false
64+
headers: |-
65+
content-type: text/plain; charset=utf-8
66+
cache-control: no-cache, max-age=0

agent-install/agent.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Roboflow agent installer (Windows / PowerShell).
2+
#
3+
# Served from https://repo.roboflow.com/agent-install/agent.ps1
4+
# Source of truth: https://github.com/roboflow/computer-vision-skills/blob/main/agent-install/agent.ps1
5+
#
6+
# Usage:
7+
# iwr -useb https://repo.roboflow.com/agent-install/agent.ps1 | iex
8+
#
9+
# TODO: install logic.
10+
$ErrorActionPreference = "Stop"
11+
12+
Write-Host "Roboflow agent installer - placeholder. Replace with real install logic."

agent-install/agent.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
# Roboflow agent installer (macOS / Linux).
3+
#
4+
# Served from https://repo.roboflow.com/agent-install/agent.sh
5+
# Source of truth: https://github.com/roboflow/computer-vision-skills/blob/main/agent-install/agent.sh
6+
#
7+
# Usage:
8+
# curl -fsSL https://repo.roboflow.com/agent-install/agent.sh | bash
9+
#
10+
# TODO: install logic.
11+
set -euo pipefail
12+
13+
echo "Roboflow agent installer — placeholder. Replace with real install logic."

0 commit comments

Comments
 (0)