Skip to content

Commit

Permalink
image arch suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
biglittlebigben committed Jan 12, 2024
1 parent 0d9d1b7 commit e0a046e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish-gstreamer-amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 1 addition & 2 deletions .github/workflows/publish-gstreamer-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 7 additions & 4 deletions .github/workflows/publish-gstreamer-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
buildjet-runs-on:
required: true
type: string
arch:
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: true
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
31 changes: 31 additions & 0 deletions build/gstreamer/tag.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e0a046e

Please sign in to comment.