From cc823fe5e7281d3fc71562f8f005a35ab7029142 Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:30:21 +0530 Subject: [PATCH 1/7] fix: build backend workflow --- .github/workflows/build_backend.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_backend.yaml b/.github/workflows/build_backend.yaml index f6ee603..46b5ecf 100644 --- a/.github/workflows/build_backend.yaml +++ b/.github/workflows/build_backend.yaml @@ -1,6 +1,6 @@ --- -name: Build docker image- backend application +name: Build docker image - backend application on: push: @@ -53,7 +53,7 @@ jobs: - name: Build and push uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: - context: . + context: ./edc-chat-app-backend file: ./edc-chat-app-backend/Dockerfile platforms: linux/amd64, linux/arm64 push: ${{ github.event_name != 'pull_request' }} From 4de1b4a17759a239f452f19c9de3e1b559e9aef1 Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:34:28 +0530 Subject: [PATCH 2/7] fix: workflow file --- .github/workflows/build_backend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_backend.yaml b/.github/workflows/build_backend.yaml index 46b5ecf..83c1681 100644 --- a/.github/workflows/build_backend.yaml +++ b/.github/workflows/build_backend.yaml @@ -43,7 +43,7 @@ jobs: ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} tags: | # set latest tag for main branch - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} From 244949cb29579effb47109342361fcdc8e550b2d Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:35:51 +0530 Subject: [PATCH 3/7] fix: workflow file --- .github/workflows/build_backend.yaml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/build_backend.yaml b/.github/workflows/build_backend.yaml index 83c1681..5771624 100644 --- a/.github/workflows/build_backend.yaml +++ b/.github/workflows/build_backend.yaml @@ -30,26 +30,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 - # Needed to create multi-platfrom image - - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - # Create SemVer or ref tags dependent of trigger event - - name: Docker meta - id: meta - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 - with: - images: | - ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} - tags: | - # set latest tag for main branch - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=semver,pattern={{major}}.{{minor}} - - name: Build and push uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: From 7f86b8ddf57e129aacddb8b029912f27579c569b Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:37:05 +0530 Subject: [PATCH 4/7] fix: context path --- .github/workflows/build_backend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_backend.yaml b/.github/workflows/build_backend.yaml index 5771624..cedf214 100644 --- a/.github/workflows/build_backend.yaml +++ b/.github/workflows/build_backend.yaml @@ -33,7 +33,7 @@ jobs: - name: Build and push uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: - context: ./edc-chat-app-backend + context: . file: ./edc-chat-app-backend/Dockerfile platforms: linux/amd64, linux/arm64 push: ${{ github.event_name != 'pull_request' }} From ede0c2ce7e75bdde86915452c11add63467b8b0c Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:46:56 +0530 Subject: [PATCH 5/7] fix: workflows --- .github/workflows/build_backend.yaml | 4 +++- .github/workflows/build_frontend.yaml | 24 +++--------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_backend.yaml b/.github/workflows/build_backend.yaml index cedf214..c95f8c4 100644 --- a/.github/workflows/build_backend.yaml +++ b/.github/workflows/build_backend.yaml @@ -4,6 +4,8 @@ name: Build docker image - backend application on: push: + paths: + - edc-chat-app-backend/* branches: - main # trigger events for SemVer like tags @@ -30,7 +32,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 - - name: Build and push + - name: Build uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: context: . diff --git a/.github/workflows/build_frontend.yaml b/.github/workflows/build_frontend.yaml index 3a0317a..c129a7b 100644 --- a/.github/workflows/build_frontend.yaml +++ b/.github/workflows/build_frontend.yaml @@ -4,6 +4,8 @@ name: Build docker image- frontend application on: push: + paths: + - edc-chat-app-ui/* branches: - main # trigger events for SemVer like tags @@ -30,27 +32,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 - # Needed to create multi-platfrom image - - name: Set up QEMU - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - # Create SemVer or ref tags dependent of trigger event - - name: Docker meta - id: meta - uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 - with: - images: | - ${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }} - tags: | - # set latest tag for main branch - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }},event=pr - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=semver,pattern={{major}}.{{minor}} - - - name: Build and push + - name: Build uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: context: . From 1494453dae874a70c5ea6b1e91f3dc42e84a298f Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:48:37 +0530 Subject: [PATCH 6/7] fix: dockerfile name --- .github/workflows/build_frontend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_frontend.yaml b/.github/workflows/build_frontend.yaml index c129a7b..64ed74f 100644 --- a/.github/workflows/build_frontend.yaml +++ b/.github/workflows/build_frontend.yaml @@ -36,7 +36,7 @@ jobs: uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 with: context: . - file: ./edc-chat-app-ui/Dockerfile + file: ./edc-chat-app-ui/Dockerfile-smartsense platforms: linux/amd64, linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} From b83341eb7f5c2d9ea017d8d21d9cf243c1db0a35 Mon Sep 17 00:00:00 2001 From: Nitin Date: Thu, 5 Dec 2024 12:53:30 +0530 Subject: [PATCH 7/7] fix: step name for frontend --- .github/workflows/build_frontend.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_frontend.yaml b/.github/workflows/build_frontend.yaml index 64ed74f..9a3e740 100644 --- a/.github/workflows/build_frontend.yaml +++ b/.github/workflows/build_frontend.yaml @@ -19,7 +19,7 @@ on: jobs: - build-docker-images-backend: + build-docker-images-frontend: runs-on: ubuntu-latest permissions: packages: write