From 3087e3862917b17f22c074ba4c883a3d21f4a32c Mon Sep 17 00:00:00 2001 From: Erik Bylund Date: Mon, 27 Nov 2023 09:24:38 +0100 Subject: [PATCH] Initial Proof of Concept for self-hosted runner ci --- .github/workflows/k8s-runner.yml | 52 ++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/k8s-runner.yml diff --git a/.github/workflows/k8s-runner.yml b/.github/workflows/k8s-runner.yml new file mode 100644 index 00000000..302c7811 --- /dev/null +++ b/.github/workflows/k8s-runner.yml @@ -0,0 +1,52 @@ +name: POC k8s runner +run-name: poc-k8s-runner +on: + pull_request: + branches: # Made towards the following + - main + - dev* + - ci/dev + types: # Only on the following activity + - opened + - synchronize # Changes to the branch like new commits, ammends, etc. + - reopened + - unlocked + push: + branches: # Made towards the following + - main + - dev + - ci/dev + tags: + - v** + workflow_dispatch: {} + +jobs: + test: + name: POC-k8s-ping + runs-on: [k8s] + container: + image: ubuntu:22.04 + + steps: + - name: Setup git + run: | + apt update + apt-get install -y git + git config --global --add safe.directory /__w/unity-sdk/unity-sdk + - name: Setup curl + run: | + apt update + apt-get install -y curl + + - name: Checkout this repository + uses: actions/checkout@v3 + + - name: Cat package.json + run: cat package.json + + - name: Check branch + run: git branch + + - name: Ping stage + run: | + curl -X POST "${{ SECRETS.LL_STAGE_URL }}/game/v2/session/guest" -H "Content-Type: application/json" -d "{\"game_key\": \"dev_dc52acb52a8b49be81761e709f1df9fd\", \"game_version\": \"0.10.0.0\", \"player_identifier\": \"k8s-runner-guest\"}"