diff --git a/.github/workflows/publish-gstreamer-amd64.yaml b/.github/workflows/publish-gstreamer-amd64.yaml index 35367a05..a90c6da7 100644 --- a/.github/workflows/publish-gstreamer-amd64.yaml +++ b/.github/workflows/publish-gstreamer-amd64.yaml @@ -9,7 +9,8 @@ jobs: gstreamer-build-amd64: uses: ./.github/workflows/publish-gstreamer-base.yaml with: - buildjet-runs-on: buildjet-8vcpu-ubuntu-2204 + buildjet-runs-on: buildjet-8vcpu-ubuntu-2204 + arch: amd64 secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/publish-gstreamer-arm64.yaml b/.github/workflows/publish-gstreamer-arm64.yaml index 28d8cfab..44c60900 100644 --- a/.github/workflows/publish-gstreamer-arm64.yaml +++ b/.github/workflows/publish-gstreamer-arm64.yaml @@ -2,14 +2,13 @@ name: GStreamer build ARM64 on: workflow_dispatch: - pull_request: - branches: [ main ] jobs: gstreamer-build-arm64: uses: ./.github/workflows/publish-gstreamer-base.yaml with: buildjet-runs-on: namespace-profile-arm-16 + arch: arm64 secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/publish-gstreamer-base.yaml b/.github/workflows/publish-gstreamer-base.yaml index f66ae632..fa17491e 100644 --- a/.github/workflows/publish-gstreamer-base.yaml +++ b/.github/workflows/publish-gstreamer-base.yaml @@ -4,6 +4,9 @@ on: buildjet-runs-on: required: true type: string + arch: + required: true + type: string secrets: DOCKERHUB_USERNAME: required: true @@ -39,7 +42,7 @@ jobs: GSTREAMER_VERSION=${{ env.GST_VERSION }} LIBNICE_VERSION=${{ env.LIBNICE_VERSION }} file: ./build/gstreamer/Dockerfile-base - tags: livekit/gstreamer:${{ env.GST_VERSION }}-base + tags: livekit/gstreamer:${{ env.GST_VERSION }}-base-${{ inputs.arch }} - name: Build and push dev uses: docker/build-push-action@v5 @@ -50,7 +53,7 @@ jobs: GSTREAMER_VERSION=${{ env.GST_VERSION }} LIBNICE_VERSION=${{ env.LIBNICE_VERSION }} file: ./build/gstreamer/Dockerfile-dev - tags: livekit/gstreamer:${{ env.GST_VERSION }}-dev + tags: livekit/gstreamer:${{ env.GST_VERSION }}-dev-${{ inputs.arch }} - name: Build and push prod uses: docker/build-push-action@v5 @@ -61,7 +64,7 @@ jobs: GSTREAMER_VERSION=${{ env.GST_VERSION }} LIBNICE_VERSION=${{ env.LIBNICE_VERSION }} file: ./build/gstreamer/Dockerfile-prod - tags: livekit/gstreamer:${{ env.GST_VERSION }}-prod + tags: livekit/gstreamer:${{ env.GST_VERSION }}-prod-${{ inputs.arch }} - name: Build and push prod RS uses: docker/build-push-action@v5 @@ -72,4 +75,4 @@ jobs: GSTREAMER_VERSION=${{ env.GST_VERSION }} LIBNICE_VERSION=${{ env.LIBNICE_VERSION }} file: ./build/gstreamer/Dockerfile-prod-rs - tags: livekit/gstreamer:${{ env.GST_VERSION }}-prod-rs + tags: livekit/gstreamer:${{ env.GST_VERSION }}-prod-rs-${{ inputs.arch }} diff --git a/build/gstreamer/tag.sh b/build/gstreamer/tag.sh new file mode 100755 index 00000000..53f14bc3 --- /dev/null +++ b/build/gstreamer/tag.sh @@ -0,0 +1,31 @@ +#!/bin/bash +set -x + +#jq '.manifests[] | select(.platform.architecture == "amd64").digest' + +image_suffix=(base dev prod prod-rs) +archs=(amd64 arm64) +gst_version=1.22.8 + +for suffix in ${image_suffix[*]} +do + digests=() + for arch in ${archs[*]} + do + #docker manifest inspect livekit/gstreamer:$gst_version-$suffix-$arch | jq ".manifests[] | select(.platform.architecture == \"$arch\").digest" + digest=`docker manifest inspect livekit/gstreamer:$gst_version-$suffix-$arch | jq ".manifests[] | select(.platform.architecture == \"$arch\").digest"` + # remove quotes + digest=${digest:1:$[${#digest}-2]} + digests+=($digest) + done + + manifests="" + for digest in ${digests[*]} + do + manifests+=" livekit/gstreamer@$digest" + done + + docker manifest create livekit/gstreamer:$gst_version-$suffix$manifests + docker manifest push livekit/gstreamer:$gst_version-$suffix +done +