From 424875693a89c208a10a968784e377c97fa733b5 Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Tue, 23 Dec 2025 18:17:25 -0300 Subject: [PATCH 1/2] .github: Only tag images as latest for tags We only want to release "latest" images* when we are doing a release, not on every main build. We have already changed staging to deploy from the `-main` tags so it stays up to date with main, but we only want prod to use a stable tag. Prod also includes public Os, which should definitely only deploy images that have been thoroughly tested and tagged as a release. * Keep in mind we're not referring to literally `latest` docker tags, because we use the same docker repository for multiple pipelines. So for example, it's more like live-app-streamdiffusion being the latest for the streamdiffusion pipelines. --- .github/workflows/ai-runner-docker-batch-base.yaml | 2 +- .github/workflows/ai-runner-docker-batch-pipelines.yaml | 4 ++-- .github/workflows/ai-runner-docker-live-comfyui.yaml | 4 ++-- .github/workflows/ai-runner-docker-live-noop.yaml | 4 ++-- .github/workflows/ai-runner-docker-live-scope.yaml | 4 ++-- .github/workflows/ai-runner-docker-live-streamdiffusion.yaml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ai-runner-docker-batch-base.yaml b/.github/workflows/ai-runner-docker-batch-base.yaml index fab1e7d7f..078869921 100644 --- a/.github/workflows/ai-runner-docker-batch-base.yaml +++ b/.github/workflows/ai-runner-docker-batch-base.yaml @@ -56,7 +56,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{version}},prefix=v type=semver,pattern={{major}}.{{minor}},prefix=v - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }} type=raw,value=base,enable={{is_default_branch}} type=raw,value=${{ github.event.pull_request.head.ref }} type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} diff --git a/.github/workflows/ai-runner-docker-batch-pipelines.yaml b/.github/workflows/ai-runner-docker-batch-pipelines.yaml index a6b01be93..7073dffb8 100644 --- a/.github/workflows/ai-runner-docker-batch-pipelines.yaml +++ b/.github/workflows/ai-runner-docker-batch-pipelines.yaml @@ -69,7 +69,7 @@ jobs: images: | livepeer/ai-runner tags: | - type=raw,value=${{ steps.docker-tag.outputs.suffix }},enable={{is_default_branch}} + type=raw,value=${{ steps.docker-tag.outputs.suffix }},enable=${{ github.ref_type == 'tag' }} type=sha,prefix=${{ steps.docker-tag.outputs.suffix }}- type=ref,event=pr,prefix=${{ steps.docker-tag.outputs.suffix }}- type=ref,event=tag,prefix=${{ steps.docker-tag.outputs.suffix }}- @@ -79,7 +79,7 @@ jobs: type=semver,pattern={{major}}.{{minor}},prefix=${{ steps.docker-tag.outputs.suffix }}- type=semver,pattern={{version}},prefix=${{ steps.docker-tag.outputs.suffix }}-v type=semver,pattern={{major}}.{{minor}},prefix=${{ steps.docker-tag.outputs.suffix }}-v - type=raw,value=latest,enable={{is_default_branch}},prefix=${{ steps.docker-tag.outputs.suffix }}- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=${{ steps.docker-tag.outputs.suffix }}- type=raw,value=${{ github.event.pull_request.head.ref }},enable=${{ github.event_name == 'pull_request' }},prefix=${{ steps.docker-tag.outputs.suffix }}- type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }},prefix=${{ steps.docker-tag.outputs.suffix }}- diff --git a/.github/workflows/ai-runner-docker-live-comfyui.yaml b/.github/workflows/ai-runner-docker-live-comfyui.yaml index ac7aff211..9bbbe6abf 100644 --- a/.github/workflows/ai-runner-docker-live-comfyui.yaml +++ b/.github/workflows/ai-runner-docker-live-comfyui.yaml @@ -43,13 +43,13 @@ jobs: with: images: livepeer/ai-runner tags: | - type=raw,value=live-app-comfyui,enable={{is_default_branch}} + type=raw,value=live-app-comfyui,enable=${{ github.ref_type == 'tag' }} type=sha,prefix=live-app-comfyui-sha- type=sha,format=long,prefix=live-app-comfyui-sha- type=ref,event=pr,prefix=live-app-comfyui-pr- type=ref,event=tag,prefix=live-app-comfyui- type=ref,event=branch,prefix=live-app-comfyui- - type=raw,value=latest,enable={{is_default_branch}},prefix=live-app-comfyui- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=live-app-comfyui- - name: Get version information (for docker build tag) id: version diff --git a/.github/workflows/ai-runner-docker-live-noop.yaml b/.github/workflows/ai-runner-docker-live-noop.yaml index d82682145..af389f72c 100644 --- a/.github/workflows/ai-runner-docker-live-noop.yaml +++ b/.github/workflows/ai-runner-docker-live-noop.yaml @@ -147,13 +147,13 @@ jobs: with: images: livepeer/ai-runner tags: | - type=raw,value=live-app-noop,enable={{is_default_branch}} + type=raw,value=live-app-noop,enable=${{ github.ref_type == 'tag' }} type=sha,prefix=live-app-noop-sha- type=sha,format=long,prefix=live-app-noop-sha- type=ref,event=pr,prefix=live-app-noop-pr- type=ref,event=tag,prefix=live-app-noop- type=ref,event=branch,prefix=live-app-noop- - type=raw,value=latest,enable={{is_default_branch}},prefix=live-app-noop- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=live-app-noop- - name: Get version information (for docker build tag) id: version diff --git a/.github/workflows/ai-runner-docker-live-scope.yaml b/.github/workflows/ai-runner-docker-live-scope.yaml index 0242499f8..60b5c8948 100644 --- a/.github/workflows/ai-runner-docker-live-scope.yaml +++ b/.github/workflows/ai-runner-docker-live-scope.yaml @@ -45,13 +45,13 @@ jobs: with: images: livepeer/ai-runner tags: | - type=raw,value=live-app-scope,enable={{is_default_branch}} + type=raw,value=live-app-scope,enable=${{ github.ref_type == 'tag' }} type=sha,prefix=live-app-scope-sha- type=sha,format=long,prefix=live-app-scope-sha- type=ref,event=pr,prefix=live-app-scope-pr- type=ref,event=tag,prefix=live-app-scope- type=ref,event=branch,prefix=live-app-scope- - type=raw,value=latest,enable={{is_default_branch}},prefix=live-app-scope- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=live-app-scope- - name: Get version information (for docker build tag) id: version diff --git a/.github/workflows/ai-runner-docker-live-streamdiffusion.yaml b/.github/workflows/ai-runner-docker-live-streamdiffusion.yaml index ce7005722..ae49d0d9c 100644 --- a/.github/workflows/ai-runner-docker-live-streamdiffusion.yaml +++ b/.github/workflows/ai-runner-docker-live-streamdiffusion.yaml @@ -60,13 +60,13 @@ jobs: with: images: livepeer/ai-runner tags: | - type=raw,value=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }},enable={{is_default_branch}} + type=raw,value=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }},enable=${{ github.ref_type == 'tag' }} type=sha,prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}-sha- type=sha,format=long,prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}-sha- type=ref,event=pr,prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}-pr- type=ref,event=tag,prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}- type=ref,event=branch,prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}- - type=raw,value=latest,enable={{is_default_branch}},prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=live-app-streamdiffusion${{ env.DOCKER_SUFFIX }}- - name: Get version information (for docker build tag) id: version From 7fc49545afb699e7dc67b4bb1de775106fed31f7 Mon Sep 17 00:00:00 2001 From: Victor Elias Date: Wed, 24 Dec 2025 18:26:01 -0300 Subject: [PATCH 2/2] .github: Fix tags on live-base image as well --- .github/workflows/ai-runner-docker-live-noop.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ai-runner-docker-live-noop.yaml b/.github/workflows/ai-runner-docker-live-noop.yaml index af389f72c..b89f5c21a 100644 --- a/.github/workflows/ai-runner-docker-live-noop.yaml +++ b/.github/workflows/ai-runner-docker-live-noop.yaml @@ -66,13 +66,13 @@ jobs: with: images: livepeer/ai-runner tags: | - type=raw,value=live-base,enable={{is_default_branch}} + type=raw,value=live-base,enable=${{ github.ref_type == 'tag' }} type=sha,prefix=live-base-sha- type=sha,format=long,prefix=live-base-sha- type=ref,event=pr,prefix=live-base-pr- type=ref,event=tag,prefix=live-base- type=ref,event=branch,prefix=live-base- - type=raw,value=latest,enable={{is_default_branch}},prefix=live-base- + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }},prefix=live-base- - name: Login to DockerHub uses: docker/login-action@v3