From 0ef13e0f631e18aaadc26f870565ae18a5ea404f Mon Sep 17 00:00:00 2001
From: jcschaff <schaff.jim@gmail.com>
Date: Fri, 31 May 2024 16:15:12 -0400
Subject: [PATCH] fix github action syntax for docker push

---
 .github/workflows/docker.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 9239bb1..90b977f 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -25,9 +25,13 @@ jobs:
           username: ${{ secrets.ACTION_USER }}
           password: ${{ secrets.ACTION_TOKEN }}
 
+      - name: Shorten SHA
+        id: shorten_sha
+        run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV
+
       - name: Build and push Docker image
         uses: docker/build-push-action@v5
         with:
           context: .
           push: true
-          tags: ghcr.io/${{ github.repository }}/modelbricks:${{ github.sha.substring(0, 7) }}
\ No newline at end of file
+          tags: ghcr.io/virtualcell/modelbricks:${{ env.SHORT_SHA }}
\ No newline at end of file