-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.39 KB
/
request-sandbox.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
name: Demander un sandbox Kubernetes
on:
workflow_dispatch:
inputs:
email:
description: 'Main github email'
required: true
jobs:
create_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set login name to lowercase
run: |
USERNAME=$(echo "${{ github.event.sender.login }}" | tr '[:upper:]' '[:lower:]')
echo USERNAME=$USERNAME >> $GITHUB_ENV
- name: Add user to sandbox list
run: |
yq eval '. += [{"user": "${{ env.USERNAME }}", "email": "${{github.event.inputs.email}}"}]' system/sandboxes/sandbox-list.yaml -i
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
title: Create sandbox for ${{github.event.sender.login}}
branch: sandbox/${{ env.USERNAME }}
body: |
@${{github.event.sender.login}}. Once this PR is merged, you will be able to login
to your sandbox by following these steps:
1. Go to https://cedille.omni.siderolabs.io/cluster/cedille-cluster/overview, click "Download kubeconfig" and put that file as ~/.kube/config
2. Install vcluster on your computer: https://www.vcluster.com/docs/getting-started/setup
3. run `vcluster connect vcluster-sandbox -n sandbox-${{ env.USERNAME }}`
4. Start using kubectl to play around!