Updated NPM changelogs (#631) #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish container images | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'UE*' | |
| paths: | |
| - 'SignallingWebServer/package.json' | |
| jobs: | |
| signalling-server-image: | |
| if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Obtain the UE version from the branch name | |
| id: extract-version | |
| run: | | |
| BRANCH_NAME=${{ github.ref_name }} | |
| echo "version=${BRANCH_NAME#UE}" >> $GITHUB_OUTPUT | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: pixelstreamingunofficial | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push the Signalling Server container image | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| tags: 'pixelstreamingunofficial/pixel-streaming-signalling-server:${{ steps.extract-version.outputs.version }}' | |
| push: true | |
| file: SignallingWebServer/Dockerfile | |
| - id: get-package-json | |
| run: | | |
| package_content=`cat SignallingWebServer/package.json` | |
| echo "json<<EOF" >> $GITHUB_OUTPUT | |
| echo $package_content >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| - uses: actions/github-script@v5 | |
| with: | |
| script: | | |
| github.rest.git.createRef({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| ref: 'refs/tags/signalling-webserver-${{ github.ref_name }}-${{ fromJson(steps.get-package-json.outputs.json).version }}', | |
| sha: context.sha | |
| }) |