From 410ac1eb42e3c834c343ee70dca41c285eb4851d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Carin=CC=83ana?= Date: Fri, 22 Nov 2024 11:58:48 +0100 Subject: [PATCH 1/3] Changing tag and way to clone repo --- .github/workflows/build_images_uv.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_images_uv.yaml b/.github/workflows/build_images_uv.yaml index 8de202f11..3773b0865 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 @@ -30,11 +28,8 @@ jobs: - '.github/**' - 'lumigator/**' - - 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 + 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 +54,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' || '' }} From ab66d9b39c5a76af852d8f70835d5a474a466811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Carin=CC=83ana?= Date: Fri, 22 Nov 2024 12:11:12 +0100 Subject: [PATCH 2/3] Excluding FW files --- .github/workflows/build_images_uv.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_images_uv.yaml b/.github/workflows/build_images_uv.yaml index 3773b0865..d55ead444 100644 --- a/.github/workflows/build_images_uv.yaml +++ b/.github/workflows/build_images_uv.yaml @@ -27,6 +27,7 @@ jobs: rebuild: - '.github/**' - 'lumigator/**' + - '!lumigator/lumigator/frontend/**' - name: Truncate commit SHA run: echo "GITHUB_SHA_SHORT=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV From 57d2c5fadbd15bdf87ebe0b51f078c8a436e7352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Carin=CC=83ana?= Date: Fri, 22 Nov 2024 12:29:06 +0100 Subject: [PATCH 3/3] Making the Truncate commit SHA step conditional --- .github/workflows/build_images_uv.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_images_uv.yaml b/.github/workflows/build_images_uv.yaml index d55ead444..617d1ee4a 100644 --- a/.github/workflows/build_images_uv.yaml +++ b/.github/workflows/build_images_uv.yaml @@ -30,6 +30,7 @@ jobs: - '!lumigator/lumigator/frontend/**' - 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