diff --git a/.github/workflows/build_images_uv.yaml b/.github/workflows/build_images_uv.yaml index 8de202f11..617d1ee4a 100644 --- a/.github/workflows/build_images_uv.yaml +++ b/.github/workflows/build_images_uv.yaml @@ -18,8 +18,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v4 - name: Check for modified paths uses: dorny/paths-filter@v3 @@ -29,12 +27,11 @@ jobs: rebuild: - '.github/**' - 'lumigator/**' + - '!lumigator/lumigator/frontend/**' - - name: Get repo version - if: steps.filter.outputs.rebuild == 'true' - run: | - echo "REPOVERSION=$(git describe --tags --dirty --match \"[0-9\.]*\" --always)" >> $GITHUB_ENV - echo "Version of the repo for this build: $REPOVERSION" + - name: Truncate commit SHA + if: steps.filter.outputs.rebuild == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main' + run: echo "GITHUB_SHA_SHORT=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV - name: Set up QEMU if: steps.filter.outputs.rebuild == 'true' @@ -59,5 +56,5 @@ jobs: push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} target: "main_image" tags: | - mzdotai/lumigator:backend_dev_${{ env.REPOVERSION }} + mzdotai/lumigator:backend_dev_${{ env.GITHUB_SHA_SHORT }} ${{ github.ref == 'refs/heads/main' && 'mzdotai/lumigator:latest' || '' }}