-
Notifications
You must be signed in to change notification settings - Fork 9
74 lines (63 loc) · 2.58 KB
/
selfhosted-poc.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
name: Selfhosted Runner Proof of Concept
run-name: selfhosted-poc
on:
push:
branches: # Made towards the following
- ci/*
workflow_dispatch: {}
jobs:
ping-stage-test:
name: Ping stage backend
if: false
runs-on: ubuntu-22.04-4-core
steps:
- name: Setup Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ SECRETS.CI_TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ SECRETS.CI_TS_OAUTH_SECRET }}
tags: tag:ci
- name: Setup git
run: |
git config --global --add safe.directory /__w/unreal-sdk/unreal-sdk
##- name: Setup curl
## run: |
## sudo apt-get update
## apt-get install -y curl
- name: Checkout this repository
uses: actions/checkout@v4
- name: Cat uplugin file
run: cat LootLockerSDK/LootLockerSDK.uplugin
- name: Check branch
run: git branch
- name: Ping stage
run: |
curl -X POST "https://${{ 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\"}"
- name: Docker Authorize
run: |
docker login ghcr.io -u ${{ SECRETS.UNREAL_DOCKER_PACKAGES_READ_USERNAME }} -p ${{ SECRETS.UNREAL_DOCKER_PACKAGES_READ_ACCESS_TOKEN }}
docker pull ghcr.io/epicgames/unreal-engine:dev-5.4
package-sdk:
name: Package SDK
runs-on: ubuntu-latest
steps:
- name: Setup git
run: |
git config --global --add safe.directory /__w/unreal-sdk/unreal-sdk
- name: Checkout this repository
uses: actions/checkout@v4
- name: Package SDK
run: |
SDK_PATH="$(pwd)"
SDK_NAME=`find "$SDK_PATH" -type f -name "*.uplugin" | sed -n -r "s/.*\/([-A-Za-z0-9_]+)\.uplugin/\1/p"`
SDK_VERSION=`sed -n -r 's/^ +\"VersionName\": \"([0-9]+.[0-9]+.[0-9]+)\",/\1/p' < "$SDK_PATH/$SDK_NAME/$SDK_NAME.uplugin"`
CURRENT_PACKAGE_DIR="Packaged"
mkdir -p "$CURRENT_PACKAGE_DIR"
PACKAGE_NAME="${SDK_NAME}v${SDK_VERSION}_for_Unreal_Engine_$UNREAL_INSTALLATIONS_TAGS[i].zip"
tar -a -cf "$CURRENT_PACKAGE_DIR/$PACKAGE_NAME" -C "$SDK_PATH" "$SDK_NAME"
echo " Package $PACKAGE_NAME produced to path $CURRENT_PACKAGE_DIR"
- name: Expose packages
uses: actions/upload-artifact@v4
with:
name: Packaged SDK
path: Packaged/*.zip