From 72d89164e67b700c554adf0d988363e33867dab8 Mon Sep 17 00:00:00 2001 From: omri zaher Date: Thu, 18 Sep 2025 17:56:34 +0300 Subject: [PATCH] Refactor Docker image tagging to use short commit SHA for better readability --- .github/workflows/e2e-testing.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-testing.yml b/.github/workflows/e2e-testing.yml index 7d3483c72..ec3419865 100644 --- a/.github/workflows/e2e-testing.yml +++ b/.github/workflows/e2e-testing.yml @@ -22,14 +22,16 @@ jobs: # Login to DockerHub echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - TAG="${{ github.sha }}-$(date +%Y%m%d-%H%M%S)" + # Use short commit SHA (first 7 characters) + SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7) + TAG="${SHORT_SHA}-$(date +%Y%m%d-%H%M%S)" echo "tag=$TAG" >> $GITHUB_OUTPUT docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/wekan:$TAG . docker push ${{ secrets.DOCKERHUB_USERNAME }}/wekan:$TAG - # Save the tag for later *steps* (if you need the tag value in another JOB, use artifacts, as seen in class) + # Save the tag for later steps echo "WEKAN_IMAGE_TAG=$TAG" >> $GITHUB_ENV - name: Copy docker-compose file to EC2