-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdeploy-ruby-sinatra-fastmcp-to-tp4cf.yml
More file actions
100 lines (92 loc) · 2.75 KB
/
Copy pathdeploy-ruby-sinatra-fastmcp-to-tp4cf.yml
File metadata and controls
100 lines (92 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Deploy ruby-sinatra-fastmcp to TP4CF
on:
workflow_call:
inputs:
cf_api:
required: true
type: string
description: 'Cloud Foundry API Endpoint'
cf_username:
required: false
type: string
description: 'Cloud Foundry Username (not required if using SSO)'
use_sso:
required: false
type: boolean
default: false
description: 'Whether to use SSO authentication instead of username/password'
cf_org:
required: true
type: string
description: 'Cloud Foundry Target Organization'
cf_space:
required: true
type: string
description: 'Cloud Foundry Target Space'
genai_plan:
required: false
type: string
description: 'GenAI Service Plan Name (if needed by app)'
random_route:
required: false
type: boolean
default: false
description: 'Whether to use a random route for the application'
secrets:
CF_PASSWORD:
required: false
description: 'Cloud Foundry Password (not required if using SSO)'
CF_SSO_REFRESH_TOKEN:
required: false
description: 'Cloud Foundry SSO Refresh Token (not required if using username/password)'
AVIATIONSTACK_API_KEY:
required: false
description: 'AviationStack API Key'
permissions: {}
jobs:
build:
uses: ./.github/workflows/ruby-sinatra-fastmcp.yml
authenticate:
needs: build
uses: ./.github/workflows/cf-auth.yml
with:
cf_api: ${{ inputs.cf_api }}
cf_username: ${{ inputs.cf_username }}
use_sso: ${{ inputs.use_sso }}
secrets:
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_SSO_REFRESH_TOKEN: ${{ secrets.CF_SSO_REFRESH_TOKEN }}
setup_org_space:
needs: authenticate
uses: ./.github/workflows/cf-org-space.yml
with:
cf_org: ${{ inputs.cf_org }}
cf_space: ${{ inputs.cf_space }}
create_services:
needs: setup_org_space
uses: ./.github/workflows/cf-create-services.yml
with:
genai_service_name: 'flight-tracking-bot-llm'
genai_plan: ${{ inputs.genai_plan }}
set_env_vars:
needs: create_services
runs-on: ubuntu-latest
steps:
- name: Create env vars file
run: |
echo '{
"AVIATIONSTACK_API_KEY": "${{ secrets.AVIATIONSTACK_API_KEY }}"
}' > env_vars.json
cat env_vars.json
- name: Upload env vars file
uses: actions/upload-artifact@v6
with:
name: env-vars
path: env_vars.json
retention-days: 1
deploy:
needs: set_env_vars
uses: ./.github/workflows/cf-deploy.yml
with:
project_path: 'ruby-sinatra-fastmcp'
random_route: ${{ inputs.random_route }}