Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
ci: tag media-server latest when main moves without media changes
Richie McIlroyacb35a0f8d49
diff --git a/.github/workflows/docker-build-media-server.yml b/.github/workflows/docker-build-media-server.ymlindex 72e42b64a..12eca1b33 100644--- a/.github/workflows/docker-build-media-server.yml+++ b/.github/workflows/docker-build-media-server.yml@@ -199,7 +199,19 @@ jobs:run: |if [[ "$IMAGE_TAG" == "latest" ]]; thencurrent="$(gh api "repos/${GITHUB_REPOSITORY}/git/ref/heads/main" --jq .object.sha)"- [[ "$current" == "$GITHUB_SHA" ]] || exit 1+ if [[ "$current" != "$GITHUB_SHA" ]]; then+ # Merge trains move main during the build. Keep the tag only when this commit is on main and no newer commit changes this workflow's paths, so an older image can never replace a newer one.+ comparison="$(gh api "repos/${GITHUB_REPOSITORY}/compare/${GITHUB_SHA}...${current}")"+ [[ "$(jq -r .status <<<"$comparison")" == "ahead" ]] || exit 1+ (($(jq '.files | length' <<<"$comparison") < 300)) || exit 1+ jq -e '[.files[] | .filename, (.previous_filename // empty)+ | select(startswith("apps/media-server/")+ or . == "scripts/benchmark-instant-audio.py"+ or . == "scripts/benchmark-audio-intelligibility.py"+ or . == "scripts/test-audio-intelligibility.py"+ or . == ".github/workflows/docker-build-media-server.yml")]+ | length == 0' <<<"$comparison" >/dev/null || exit 1+ fifisources=()for path in /tmp/digests/*; do