From 4e3da7c3678d2f6d4d399dfcbdb33512985a4582 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Thu, 27 Feb 2025 12:19:05 -0500 Subject: [PATCH] fix docker --- .github/workflows/docker.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 530c7cd8df..d85086e27e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 @@ -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: @@ -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) || '' }}