fix(ws): adjust WebSocket path handling for proxy scenarios to preven… #3740
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: Build and Publish Docker | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "*" | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.arch }} image | |
| runs-on: ${{ matrix.runner }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: amd64 | |
| platform: linux/amd64 | |
| runner: ubuntu-latest | |
| - arch: arm64 | |
| platform: linux/arm64 | |
| runner: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Prepare build variables | |
| id: build | |
| run: | | |
| echo "image_repository=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_OUTPUT}" | |
| echo "image_name=fpp" >> "${GITHUB_OUTPUT}" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push image by digest | |
| id: docker-build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./Docker/Dockerfile | |
| build-args: | | |
| FPPBRANCH=${{ github.ref_name }} | |
| platforms: ${{ matrix.platform }} | |
| outputs: type=image,name=${{ steps.build.outputs.image_repository }}/${{ steps.build.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true | |
| cache-from: type=gha,scope=fpp-build-docker-${{ matrix.arch }} | |
| cache-to: type=gha,scope=fpp-build-docker-${{ matrix.arch }},mode=max | |
| - name: Export digest | |
| run: | | |
| mkdir -p "${{ runner.temp }}/digests" | |
| digest="${{ steps.docker-build.outputs.digest }}" | |
| touch "${{ runner.temp }}/digests/${digest#sha256:}" | |
| - name: Upload digest | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: digests-${{ matrix.arch }} | |
| path: ${{ runner.temp }}/digests/* | |
| if-no-files-found: error | |
| retention-days: 1 | |
| merge: | |
| name: Create multi-arch manifest and push | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Prepare build variables | |
| id: build | |
| run: | | |
| echo "release_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> "${GITHUB_OUTPUT}" | |
| echo "image_repository=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "${GITHUB_OUTPUT}" | |
| echo "image_name=fpp" >> "${GITHUB_OUTPUT}" | |
| - name: Download digests | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: ${{ runner.temp }}/digests | |
| pattern: digests-* | |
| merge-multiple: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| flavor: | | |
| latest=false | |
| images: ${{ steps.build.outputs.image_repository }}/${{ steps.build.outputs.image_name }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=ref,event=branch,enable={{is_not_default_branch}} | |
| type=ref,event=tag | |
| labels: | | |
| org.opencontainers.image.created=${{ steps.build.outputs.release_date }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.version=${{ github.ref_name }} | |
| - name: Create manifest list and push | |
| working-directory: ${{ runner.temp }}/digests | |
| run: | | |
| docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ | |
| $(printf '${{ steps.build.outputs.image_repository }}/${{ steps.build.outputs.image_name }}@sha256:%s ' *) | |
| - name: Inspect image | |
| run: | | |
| docker buildx imagetools inspect ${{ steps.build.outputs.image_repository }}/${{ steps.build.outputs.image_name }}:${{ steps.meta.outputs.version }} |