forked from IGinX-THU/IGinX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
129 lines (117 loc) · 4.63 KB
/
action.yml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "db-runner"
description: "db runner"
inputs:
DB-name:
description: "DB name"
required: false
default: IoTDB12
IoTDB12-ports:
description: "IoTDB12 ports"
required: false
default: 6667
InfluxDB-ports:
description: "InfluxDB ports"
required: false
default: 8086
MongoDB-ports:
description: "MongoDB ports"
required: false
default: 27017
MySQL-ports:
description: "MySQL ports"
required: false
default: 3306
PostgreSQL-ports:
description: "PostgreSQL ports"
required: false
default: 5432
Redis-ports:
description: "Redis ports"
required: false
default: 6379
runs:
using: "composite" # Mandatory parameter
steps:
- if: inputs.DB-name=='InfluxDB' || inputs.DB-name=='Mix-IoTDB12-InfluxDB'
name: Setup DB
uses: ./.github/actions/setup/influxdb
- if: inputs.DB-name=='InfluxDB' || inputs.DB-name=='Mix-IoTDB12-InfluxDB'
name: Run DB
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb.sh" ${{ inputs.InfluxDB-ports }}
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb_windows.sh" ${{ inputs.InfluxDB-ports }}
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/influxdb_macos.sh" ${{ inputs.InfluxDB-ports }}
else
echo "$RUNNER_OS is not supported"
exit 1
fi
- if: inputs.DB-name=='IoTDB12' || inputs.DB-name=='Mix-IoTDB12-InfluxDB'
name: Setup DB
uses: ./.github/actions/setup/iotdb12
- if: inputs.DB-name=='IoTDB12' || inputs.DB-name=='Mix-IoTDB12-InfluxDB'
name: Run DB
shell: bash
run: |
java -version
which java
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12.sh" ${{ inputs.IoTDB12-ports }}
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12_windows.sh" ${{ inputs.IoTDB12-ports }}
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/dataSources/startup/iotdb12_macos.sh" ${{ inputs.IoTDB12-ports }}
else
echo "$RUNNER_OS is not supported"
exit 1
fi
- if: inputs.DB-name=='MongoDB'
name: Setup DB
uses: ./.github/actions/setup/mongodb
- if: inputs.DB-name=='MongoDB'
name: Run DB
uses: ./.github/actions/service/mongodb
with:
stop: false
clean: false
start: true
ports: ${{ inputs.MongoDB-ports }}
- if: inputs.DB-name=='Redis'
name: Setup DB
uses: ./.github/actions/setup/redis
- if: inputs.DB-name=='Redis'
name: Run DB
uses: ./.github/actions/service/redis
with:
stop: false
clean: false
start: true
ports: ${{ inputs.Redis-ports }}
- if: inputs.DB-name=='PostgreSQL'
name: Setup DB
uses: ./.github/actions/setup/postgresql
- if: inputs.DB-name=='PostgreSQL'
name: Run DB
uses: ./.github/actions/service/postgresql
with:
stop: false
clean: false
start: true
ports: ${{ inputs.PostgreSQL-ports }}
- if: inputs.DB-name=='MySQL'
name: Setup DB
uses: ./.github/actions/setup/mysql
- if: inputs.DB-name == 'MySQL'
name: Start MySQL Service
uses: ./.github/actions/service/mysql
with:
ports: ${{ inputs.MySQL-ports }}