Skip to content

Commit

Permalink
Merge pull request #1349 from opentensor/sam-fix-docker-latest-tag
Browse files Browse the repository at this point in the history
fix docker not publishing "latest" tag
  • Loading branch information
sam0x17 authored Feb 27, 2025
2 parents 3cc0360 + 9376ea2 commit 61b127a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
description: "Branch or tag to use for the Docker image tag and ref to checkout (optional)"
required: false
default: ""

push:
branches:
- devnet-ready
Expand All @@ -35,6 +34,13 @@ jobs:
echo "tag=$branch_or_tag" >> $GITHUB_ENV
echo "ref=$branch_or_tag" >> $GITHUB_ENV
# Check if this is a tagged release (not devnet-ready/devnet/testnet)
if [[ "${{ github.event_name }}" == "release" && "$branch_or_tag" != "devnet-ready" && "$branch_or_tag" != "devnet" && "$branch_or_tag" != "testnet" ]]; then
echo "latest_tag=true" >> $GITHUB_ENV
else
echo "latest_tag=false" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
with:
Expand All @@ -60,3 +66,4 @@ jobs:
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.tag }}
${{ env.latest_tag == 'true' && format('ghcr.io/{0}:latest', github.repository) || '' }}

0 comments on commit 61b127a

Please sign in to comment.