From 1eeb133c4a2515511d56e9d778c11691bbf245c9 Mon Sep 17 00:00:00 2001 From: Adish M Date: Thu, 6 Jun 2024 17:32:57 +0530 Subject: [PATCH] Docker worjflow changes --- .../tooljet-release-docker-image-build.yml | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tooljet-release-docker-image-build.yml b/.github/workflows/tooljet-release-docker-image-build.yml index 43bfd27c15..b4c91fd0a1 100644 --- a/.github/workflows/tooljet-release-docker-image-build.yml +++ b/.github/workflows/tooljet-release-docker-image-build.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: inputs: job-to-run: - description: Enter the job name (tooljet-ce/tooljet-server-ce) + description: Enter the job name (tooljet-ce) options: ["tooljet-ce"] required: true image: @@ -46,7 +46,8 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Docker image + - name: Build and Push Docker image for non-LTS tag + if: "!contains(github.event.release.tag_name, 'CE-LTS')" uses: docker/build-push-action@v4 with: context: . @@ -58,6 +59,19 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Docker image for LTS tag + if: "contains(github.event.release.tag_name, 'CE-LTS')" + uses: docker/build-push-action@v4 + with: + context: . + file: docker/production.Dockerfile + push: true + tags: tooljet/tooljet-ce:${{ github.event.release.tag_name }},tooljet/tooljet-ce:CE-LTS-latest + platforms: linux/amd64 + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Send Slack Notification run: | if [[ "${{ job.status }}" == "success" ]]; then @@ -101,6 +115,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and Push Docker image + if: "!contains(github.event.release.tag_name, 'CE-LTS')" uses: docker/build-push-action@v4 with: context: . @@ -112,6 +127,19 @@ jobs: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Docker image + if: "contains(github.event.release.tag_name, 'CE-LTS')" + uses: docker/build-push-action@v4 + with: + context: . + file: docker/production.Dockerfile + push: true + tags: tooljet/tooljet-ce:${{ github.event.inputs.image }},tooljet/tooljet-ce:CE-LTS-latest + platforms: linux/amd64 + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - name: Send Slack Notification run: | if [[ "${{ job.status }}" == "success" ]]; then