-
Notifications
You must be signed in to change notification settings - Fork 99
/
Copy pathaction.yml
81 lines (69 loc) · 2.27 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
name: init-local
description: "Initialize Nebari config for local deployment"
inputs:
directory:
description: "Path to directory to initialize in"
required: false
default: './local-deployment'
outputs:
directory:
description: "Path to config directory"
value: ${{ steps.metadata.outputs.directory }}
config:
description: "Path to Nebari config"
value: ${{ steps.metadata.outputs.config }}
project:
description: "Project name"
value: ${{ steps.metadata.outputs.project }}
domain:
description: "Domain name"
value: ${{ steps.metadata.outputs.domain }}
runs:
using: composite
steps:
- shell: bash
id: metadata
run: |
# Setup metadata
DIRECTORY=$(realpath '${{ inputs.directory }}')
mkdir --parents "${DIRECTORY}"
echo "directory=${DIRECTORY}" | tee --append "${GITHUB_OUTPUT}"
CONFIG="${DIRECTORY}/nebari-config.yaml"
echo "config=${CONFIG}" | tee --append "${GITHUB_OUTPUT}"
PROJECT='github-actions'
echo "project=${PROJECT}" | tee --append "${GITHUB_OUTPUT}"
DOMAIN='github-actions.nebari.dev'
nslookup "${DOMAIN}"
echo "domain=${DOMAIN}" | tee --append "${GITHUB_OUTPUT}"
- shell: bash -l {0}
id: init
working-directory: ${{ steps.metadata.outputs.directory }}
run: |
nebari init local \
--project-name '${{ steps.metadata.outputs.project }}' \
--domain-name '${{ steps.metadata.outputs.domain }}' \
--auth-provider password \
--output '${{ steps.metadata.outputs.config }}'
- shell: bash
run: |
# Update nebari config for CI
# Change default JupyterLab theme
cat >> '${{ steps.metadata.outputs.config }}' <<- EOM
jupyterlab:
default_settings:
"@jupyterlab/apputils-extension:themes":
theme: JupyterLab Dark
EOM
# Change default value for minio persistence size
cat >> '${{ steps.metadata.outputs.config }}' <<- EOM
monitoring:
enabled: true
overrides:
minio:
persistence:
size: 1Gi
EOM
- shell: bash
run: |
# Display Nebari config
cat '${{ steps.metadata.outputs.config }}'