-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.32 KB
/
create_endpoint.yaml
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
name: Create Hub Ingest Endpoint
on:
workflow_dispatch:
inputs:
username:
description: 'Username for the endpoint'
required: true
type: string
size:
description: 'Storage size (e.g., 50Gi)'
required: true
type: string
env:
BIOC_HUBSINGEST_PATH: "${{ github.workspace }}"
jobs:
create-endpoint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: save kubeconfig
shell: bash
run: mkdir -p ~/.kube && echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
- name: Install Kubectl
run: |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x ./kubectl && \
sudo mv ./kubectl /usr/local/bin/kubectl && \
kubectl version
- name: Set up environment
run: |
USERNAME_UPPER=$(echo "${{ inputs.username }}" | tr '[:lower:]' '[:upper:]')
echo "SECRET_NAME=S3KEY_${USERNAME_UPPER}" >> $GITHUB_ENV
- name: Create endpoint
run: |
sudo bash install_hubsingest.sh
hubsingest create_endpoint "${{ inputs.username }}" "${{ inputs.size }}" ${{ secrets[env.SECRET_NAME] }}