-
Notifications
You must be signed in to change notification settings - Fork 64
/
action.yml
66 lines (66 loc) · 2.49 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
name: "Set up MongoDB Cluster"
description: "Downloads MongoDB and runs a cluster using mongo-orchestration"
inputs:
version:
description: "MongoDB version to install"
required: false
topology:
description: "Topology of the deployment"
required: false
auth:
description: "Whether to enable auth"
required: false
ssl:
description: "Whether to enable SSL"
required: false
storage-engine:
description: "Storage engine to use"
required: false
require-api-version:
description: "Whether to start the server with requireApiVersion enabled (defaults to false)"
required: false
skip-legacy-shell:
description: "Whether to skip installing the legacy shell for 6.0+ servers (deprecated)"
required: false
install-legacy-shell:
description: "Whether to install the legacy shell for 6.0+ servers"
required: false
outputs:
cluster-uri:
description: "URI of the cluster"
value: ${{ steps.run-orchestration.outputs.cluster-uri }}
crypt-shared-lib-path:
description: "Path of the crypt_shared library"
value: ${{ steps.run-orchestration.outputs.crypt-shared-lib-path }}
runs:
using: "composite"
steps:
- id: "add-pip-path"
name: "Add PIP install folder to path"
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash
- id: "add-mongodb-binary-path"
name: "Add PIP install folder to path"
run: echo ${GITHUB_ACTION_PATH}/mongodb/bin >> $GITHUB_PATH
shell: bash
- id: "run-orchestration"
name: "Download MongoDB"
run: |
${GITHUB_ACTION_PATH}/.evergreen/run-orchestration.sh
[[ -f mo-expansion.sh ]] && source mo-expansion.sh
echo "cluster-uri=$(cat ${GITHUB_ACTION_PATH}/uri.txt)" >> $GITHUB_OUTPUT
echo "crypt-shared-lib-path=${CRYPT_SHARED_LIB_PATH}" >> $GITHUB_OUTPUT
env:
DRIVERS_TOOLS: ${{ github.action_path }}
MONGODB_BINARIES: ${{ github.action_path }}/mongodb/bin
MONGO_ORCHESTRATION_HOME: ${{ github.action_path }}/.evergreen/orchestration
PROJECT_ORCHESTRATION_HOME: ${{ github.workspace }}/.evergreen/orchestration
MONGODB_VERSION: ${{ inputs.version }}
TOPOLOGY: ${{ inputs.topology }}
AUTH: ${{ inputs.auth }}
SSL: ${{ inputs.ssl }}
STORAGE_ENGINE: ${{ inputs.storage-engine }}
REQUIRE_API_VERSION: ${{ inputs.require-api-version }}
SKIP_LEGACY_SHELL: ${{ inputs.skip-legacy-shell }}
INSTALL_LEGACY_SHELL: ${{ inputs.install-legacy-shell }}
shell: bash