From c1ad351704eb82ab80168d6ba631100925ead901 Mon Sep 17 00:00:00 2001 From: Jonathan Lopez Date: Fri, 20 Sep 2024 18:24:18 -0400 Subject: [PATCH] Adds step to set to lowercase username in request sandbox pipeline --- .github/workflows/request-sandbox.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/request-sandbox.yml b/.github/workflows/request-sandbox.yml index b61a613..46af76b 100644 --- a/.github/workflows/request-sandbox.yml +++ b/.github/workflows/request-sandbox.yml @@ -12,18 +12,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Set login name to lowercase + run: | + echo "USERNAME="${{ github.event.sender.login }}" | tr '[:upper:]' '[:lower:]')'" >> $GITHUB_OUTPUT + id: username - name: Add user to sandbox list run: | - yq eval '. += [{"user": "'$(echo "${{ github.event.sender.login }}" | tr '[:upper:]' '[:lower:]')'", "email": "${{github.event.inputs.email}}"}]' system/sandboxes/sandbox-list.yaml -i + yq eval '. += [{"user": "${{ steps.username.outputs.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/${{github.event.sender.login}} + branch: sandbox/${{ steps.username.outputs.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-"${{ github.event.sender.login }}" | tr '[:upper:]' '[:lower:]')"` + 3. run `vcluster connect vcluster-sandbox -n sandbox-${{ steps.username.outputs.USERNAME }}` 4. Start using kubectl to play around!