-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow action to create multi image manifest (#583)
Now that we are building the gstreamer images for different architectures on different workers, each architecture image being pushed overwrites the other one, resulting in image tags with only one architecture. In order to fix this, this PR renames the images created by each worker by appending an arch suffix to the tag. This then adds a GH action to be run manually after all images are built, to manually create a multi arch manifest that references the arch specific tags.
- Loading branch information
1 parent
8d0ab0d
commit e8a71ff
Showing
9 changed files
with
70 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: GStreamer publish tag | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tag-gstreamer-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Run tag script | ||
run: ./build/gstreamer/tag.sh | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
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 | ||
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 | ||
|
This file contains 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