From 6790179adc71badf0fc7be1afdcec9644360e03b Mon Sep 17 00:00:00 2001 From: Adish M <44204658+adishM98@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:23:44 +0530 Subject: [PATCH] Adding LTS 3.0 checking docker release workflow (#11111) * Adding LTS 3.0 checking docker release workflow * changed the tag to 3.0 * change the tag format with new one * change in image tag * change in image tag --- .../tooljet-release-docker-image-build.yml | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tooljet-release-docker-image-build.yml b/.github/workflows/tooljet-release-docker-image-build.yml index 2df162f3fc..a358e62c0e 100644 --- a/.github/workflows/tooljet-release-docker-image-build.yml +++ b/.github/workflows/tooljet-release-docker-image-build.yml @@ -20,18 +20,24 @@ jobs: if: "${{ github.event.release }}" steps: - - name: Checkout code - if: "!contains(github.event.release.tag_name, 'CE-LTS')" + - name: Checkout code to main + if: "contains(github.event.release.tag_name, '-ce-beta')" uses: actions/checkout@v2 with: ref: refs/heads/main - - name: Checkout code - if: "contains(github.event.release.tag_name, 'CE-LTS')" + - name: Checkout code to LTS-2.50 + if: "startsWith(github.event.release.tag_name, '2.50') && contains(github.event.release.tag_name, '-ce-lts')" uses: actions/checkout@v2 with: ref: refs/heads/lts-2.50 + - name: Checkout code to LTS-3.0 + if: "startsWith(github.event.release.tag_name, '3') && contains(github.event.release.tag_name, '-ce-lts')" + uses: actions/checkout@v2 + with: + ref: refs/heads/lts-3.0 + # Create Docker Buildx builder with platform configuration - name: Set up Docker Buildx run: | @@ -53,27 +59,40 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and Push Docker image for non-LTS tag - if: "!contains(github.event.release.tag_name, 'CE-LTS')" + - name: Build and Push Docker image for beta tag + if: "contains(github.event.release.tag_name, '-ce-beta')" 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:latest + tags: tooljet/tooljet-ce:${{ github.event.release.tag_name }},tooljet/tooljet-ce:ce-beta-latest platforms: linux/amd64 env: 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')" + - name: Build and Push Docker image for LTS 2.50 tag + if: "startsWith(github.event.release.tag_name, '2.50') && 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 + tags: tooljet/tooljet-ce:${{ github.event.release.tag_name }} + platforms: linux/amd64 + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Docker image for LTS 3.0 tag + if: "startsWith(github.event.release.tag_name, '3') && 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 }} @@ -157,7 +176,6 @@ jobs: curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }} - update-lts-machine: runs-on: ubuntu-latest needs: build-tooljet-ce-image @@ -196,4 +214,4 @@ jobs: sudo docker-compose up -d #View containers - sudo docker ps \ No newline at end of file + sudo docker ps