-
Notifications
You must be signed in to change notification settings - Fork 8
100 lines (91 loc) · 2.92 KB
/
Copy pathdeployment.yml
File metadata and controls
100 lines (91 loc) · 2.92 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: Deployment
on:
workflow_call:
inputs:
coretide_repo:
type: string
description: "GitHub repository (owner/name) to clone CoreTide from"
required: false
default: OpenTideHQ/CoreTide
coretide_path:
type: string
description: "Path where CoreTide needs to be cloned into"
required: false
default: coretide
coretide_ref:
type: string
description: "Ref to clone CoreTide from"
required: false
default: development
python_version:
type: string
description: "Python version to use"
required: false
default: "3.12"
requirements_file:
type: string
description: "Requirements file path"
required: false
default: "coretide/Engines/requirements.txt"
opentide_secrets:
type: string
description: "Content of the OpenTide secrets file"
required: false
jobs:
StagingDeployment:
name: Staging Deployment
runs-on: ubuntu-latest
if: ${{github.event_name == 'pull_request'}}
steps:
- name: Checkout Tide Instance
uses: actions/checkout@v4
with:
fetch-depth: 100
ref: ${{ github.ref }}
- name: Checkout CoreTide
uses: actions/checkout@v4
with:
repository: ${{ inputs.coretide_repo }}
path: ${{ inputs.coretide_path }}
ref: refs/heads/${{ inputs.coretide_ref }}
- name: Tide Setup
uses: ./coretide/Pipelines/GitHub/tide-setup
id: tide_setup
with:
python_version: ${{ inputs.python_version }}
requirements_file: ${{ inputs.requirements_file }}
opentide_secrets: ${{ inputs.opentide_secrets }}
- uses: ./coretide/Pipelines/GitHub/deployment
name: Deployment Routine
id: deployment_routine
with:
deployment_plan: STAGING
ProductionDeployment:
name: Production Deployment
runs-on: ubuntu-latest
if: ${{github.ref_name == github.event.repository.default_branch}}
steps:
- name: Checkout Tide Instance
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.ref }}
- name: Checkout CoreTide
uses: actions/checkout@v4
with:
repository: ${{ inputs.coretide_repo }}
path: ${{ inputs.coretide_path }}
ref: refs/heads/${{ inputs.coretide_ref }}
- name: Tide Setup
uses: ./coretide/Pipelines/GitHub/tide-setup
id: tide_setup
with:
python_version: ${{ inputs.python_version }}
requirements_file: ${{ inputs.requirements_file }}
opentide_secrets: ${{ inputs.opentide_secrets }}
- uses: ./coretide/Pipelines/GitHub/deployment
name: Deployment Routine
id: deployment_routine
with:
deployment_plan: PRODUCTION
coretide_path: ${{ inputs.coretide_path }}