-
Notifications
You must be signed in to change notification settings - Fork 118
53 lines (46 loc) · 1.63 KB
/
publish-sfu-image.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
name: Publish SFU image
on:
workflow_dispatch:
push:
branches: ['UE5.5']
paths: ['SFU/package.json']
jobs:
signalling-server-image:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
sparse-checkout: 'SFU'
sparse-checkout-cone-mode: false
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
username: pixelstreamingunofficial
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push the SFU container image
uses: docker/build-push-action@v3
with:
context: .
tags: 'pixelstreamingunofficial/pixel-streaming-sfu:5.5'
push: true
file: SFU/Dockerfile
- id: get-package-json
run: |
package_content=`cat SFU/package.json`
echo "json<<EOF" >> $GITHUB_OUTPUT
echo $package_content >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- shell: bash
id: extract_branch
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/sfu-${{ steps.extract_branch.outputs.branch }}-${{ fromJson(steps.get-package-json.outputs.json).version }}',
sha: context.sha
})