Skip to content

Commit ba23fac

Browse files
committed
ci: add GHA to sync OSC fork and trigger update
1 parent fb3ed7f commit ba23fac

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/sync-fork.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Sync OSC Fork
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: "Target environment"
8+
required: true
9+
default: "prod"
10+
type: choice
11+
options:
12+
- prod
13+
- dev
14+
- stage
15+
16+
jobs:
17+
sync-fork:
18+
name: Sync fork (${{ inputs.environment }})
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 5
21+
steps:
22+
- name: Validate environment
23+
run: |
24+
case "${{ inputs.environment }}" in
25+
prod|dev|stage) ;;
26+
*) echo "Invalid environment: ${{ inputs.environment }}"; exit 1 ;;
27+
esac
28+
29+
- name: Install OSC CLI
30+
run: npm install -g @osaas/cli
31+
32+
- name: Trigger sync fork
33+
env:
34+
OSC_ACCESS_TOKEN: unused
35+
OSC_API_KEY: ${{ secrets.OSC_API_KEY }}
36+
run: osc --env "${{ inputs.environment }}" admin sync-fork eyevinn-sgai-ad-proxy

0 commit comments

Comments
 (0)