From c83db9a84aacfb8352d31e0b579c6d01c2b7234c Mon Sep 17 00:00:00 2001 From: dhruvinmaniar123 Date: Thu, 29 Dec 2022 23:49:00 +0530 Subject: [PATCH] Latest tag release (#9516) * adding changes * adding changes * adding changes * adding changes * fixing latest tag release * fixing latest tag * fixing latest tag * fixing latest tag * fixing latest tag * fixing latest tag Co-authored-by: Dhruvin Maniar --- .github/workflows/docker-openmetadata-db.yml | 25 ++++++++++++++----- .../docker-openmetadata-ingestion-base.yml | 25 ++++++++++++++----- .../docker-openmetadata-ingestion.yml | 25 ++++++++++++++----- .../docker-openmetadata-postgres.yml | 23 +++++++++++++---- .../workflows/docker-openmetadata-server.yml | 23 +++++++++++++---- 5 files changed, 93 insertions(+), 28 deletions(-) diff --git a/.github/workflows/docker-openmetadata-db.yml b/.github/workflows/docker-openmetadata-db.yml index a029268c18f..4eec28c1f22 100644 --- a/.github/workflows/docker-openmetadata-db.yml +++ b/.github/workflows/docker-openmetadata-db.yml @@ -16,6 +16,9 @@ on: tag: description: "Input tag" required: true + push_latest_tag_to_release: + description: "Do you want to update docker image latest tag as well ?" + type: boolean release: types: [published] @@ -28,7 +31,7 @@ jobs: steps: - name: Check trigger type if: ${{ env.input == '' }} - run: echo "input=0.12.0" >> $GITHUB_ENV + run: echo "input=0.13.1" >> $GITHUB_ENV - name: Check out the Repo uses: actions/checkout@v3 @@ -44,13 +47,23 @@ jobs: with: username: ${{ secrets.DOCKERHUB_OPENMETADATA_USERNAME }} password: ${{ secrets.DOCKERHUB_OPENMETADATA_TOKEN }} - - - name: Build and push + + - name: Process Docker Tags + id: input_check + run: | + if ${{ github.event_name == 'release' }}; then + echo "tags=openmetadata/db:${{ env.input }},openmetadata/db:latest" >> $GITHUB_OUTPUT + elif ${{ github.event_name == 'workflow_dispatch' && inputs.push_latest_tag_to_release }}; then + echo "tags=openmetadata/db:${{inputs.tag}},openmetadata/db:latest" >> $GITHUB_OUTPUT + else + echo "tags=openmetadata/db:${{ inputs.tag }}" >> $GITHUB_OUTPUT + fi + + - name: Build and push if event is workflow_dispatch and input is checked uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - # Update tags before every release - tags: 'openmetadata/db:${{ env.input }},openmetadata/db:latest' - file: ./docker/local-metadata/Dockerfile_mysql + tags: ${{ steps.input_check.outputs.tags }} + file: ./docker/local-metadata/Dockerfile_mysql \ No newline at end of file diff --git a/.github/workflows/docker-openmetadata-ingestion-base.yml b/.github/workflows/docker-openmetadata-ingestion-base.yml index f27b974c33b..089cc61350b 100644 --- a/.github/workflows/docker-openmetadata-ingestion-base.yml +++ b/.github/workflows/docker-openmetadata-ingestion-base.yml @@ -16,6 +16,9 @@ on: tag: description: "Input tag" required: true + push_latest_tag_to_release: + description: "Do you want to update docker image latest tag as well ?" + type: boolean release: types: [published] @@ -28,7 +31,7 @@ jobs: steps: - name: Check trigger type if: ${{ env.input == '' }} - run: echo "input=0.12.0" >> $GITHUB_ENV + run: echo "input=0.13.1" >> $GITHUB_ENV - name: Check out the Repo uses: actions/checkout@v3 @@ -55,13 +58,23 @@ jobs: source env/bin/activate sudo make install_antlr_cli make install_dev generate - - - name: Build and push + + - name: Process Docker Tags + id: input_check + run: | + if ${{ github.event_name == 'release' }}; then + echo "tags=openmetadata/ingestion-base:${{ env.input }},openmetadata/ingestion-base:latest" >> $GITHUB_OUTPUT + elif ${{ github.event_name == 'workflow_dispatch' && inputs.push_latest_tag_to_release }}; then + echo "tags=openmetadata/ingestion-base:${{inputs.tag}},openmetadata/ingestion-base:latest" >> $GITHUB_OUTPUT + else + echo "tags=openmetadata/ingestion-base:${{ inputs.tag }}" >> $GITHUB_OUTPUT + fi + + - name: Build and push if event is workflow_dispatch and input is checked uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - # Update tags before every release - tags: 'openmetadata/ingestion-base:${{ env.input }},openmetadata/ingestion-base:latest' - file: ./ingestion/operators/docker/Dockerfile + tags: ${{ steps.input_check.outputs.tags }} + file: ./ingestion/operators/docker/Dockerfile \ No newline at end of file diff --git a/.github/workflows/docker-openmetadata-ingestion.yml b/.github/workflows/docker-openmetadata-ingestion.yml index e29c393de72..deeebb8153f 100644 --- a/.github/workflows/docker-openmetadata-ingestion.yml +++ b/.github/workflows/docker-openmetadata-ingestion.yml @@ -16,6 +16,9 @@ on: tag: description: "Input tag" required: true + push_latest_tag_to_release: + description: "Do you want to update docker image latest tag as well ?" + type: boolean release: types: [published] @@ -28,7 +31,7 @@ jobs: steps: - name: Check trigger type if: ${{ env.input == '' }} - run: echo "input=0.12.0" >> $GITHUB_ENV + run: echo "input=0.13.1" >> $GITHUB_ENV - name: Check out the Repo uses: actions/checkout@v3 @@ -55,13 +58,23 @@ jobs: source env/bin/activate sudo make install_antlr_cli make install_dev generate - - - name: Build and push + + - name: Process Docker Tags + id: input_check + run: | + if ${{ github.event_name == 'release' }}; then + echo "tags=openmetadata/ingestion:${{ env.input }},openmetadata/ingestion:latest" >> $GITHUB_OUTPUT + elif ${{ github.event_name == 'workflow_dispatch' && inputs.push_latest_tag_to_release }}; then + echo "tags=openmetadata/ingestion:${{inputs.tag}},openmetadata/ingestion:latest" >> $GITHUB_OUTPUT + else + echo "tags=openmetadata/ingestion:${{ inputs.tag }}" >> $GITHUB_OUTPUT + fi + + - name: Build and push if event is workflow_dispatch and input is checked uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - # Update tags before every release - tags: 'openmetadata/ingestion:${{ env.input }},openmetadata/ingestion:latest' - file: ./ingestion/Dockerfile + tags: ${{ steps.input_check.outputs.tags }} + file: ./ingestion/Dockerfile \ No newline at end of file diff --git a/.github/workflows/docker-openmetadata-postgres.yml b/.github/workflows/docker-openmetadata-postgres.yml index f6c1b8c6c38..fe08e808415 100644 --- a/.github/workflows/docker-openmetadata-postgres.yml +++ b/.github/workflows/docker-openmetadata-postgres.yml @@ -16,6 +16,9 @@ on: tag: description: "Input tag" required: true + push_latest_tag_to_release: + description: "Do you want to update docker image latest tag as well ?" + type: boolean release: types: [published] @@ -28,7 +31,7 @@ jobs: steps: - name: Check trigger type if: ${{ env.input == '' }} - run: echo "input=0.12.0" >> $GITHUB_ENV + run: echo "input=0.13.1" >> $GITHUB_ENV - name: Check out the Repo uses: actions/checkout@v3 @@ -45,12 +48,22 @@ jobs: username: ${{ secrets.DOCKERHUB_OPENMETADATA_USERNAME }} password: ${{ secrets.DOCKERHUB_OPENMETADATA_TOKEN }} - - name: Build and push + - name: Process Docker Tags + id: input_check + run: | + if ${{ github.event_name == 'release' }}; then + echo "tags=openmetadata/postgresql:${{ env.input }},openmetadata/postgresql:latest" >> $GITHUB_OUTPUT + elif ${{ github.event_name == 'workflow_dispatch' && inputs.push_latest_tag_to_release }}; then + echo "tags=openmetadata/postgresql:${{inputs.tag}},openmetadata/postgresql:latest" >> $GITHUB_OUTPUT + else + echo "tags=openmetadata/postgresql:${{ inputs.tag }}" >> $GITHUB_OUTPUT + fi + + - name: Build and push if event is workflow_dispatch and input is checked uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - # Update tags before every release - tags: 'openmetadata/postgresql:${{ env.input }},openmetadata/postgresql:latest' - file: ./docker/local-metadata/Dockerfile_postgres + tags: ${{ steps.input_check.outputs.tags }} + file: ./docker/local-metadata/Dockerfile_postgres \ No newline at end of file diff --git a/.github/workflows/docker-openmetadata-server.yml b/.github/workflows/docker-openmetadata-server.yml index 951fed904bd..8d5dfe172cf 100644 --- a/.github/workflows/docker-openmetadata-server.yml +++ b/.github/workflows/docker-openmetadata-server.yml @@ -16,6 +16,9 @@ on: DOCKER_RELEASE_TAG: description: "Docker Release Tag" required: true + push_latest_tag_to_release: + description: "Do you want to update docker image latest tag as well ?" + type: boolean release: types: [published] jobs: @@ -133,13 +136,23 @@ jobs: with: username: ${{ secrets.DOCKERHUB_OPENMETADATA_USERNAME }} password: ${{ secrets.DOCKERHUB_OPENMETADATA_TOKEN }} - - - name: Build and push + + - name: Process Docker Tags + id: input_check + run: | + if ${{ github.event_name == 'release' }}; then + echo "tags=openmetadata/server:${{ env.DOCKER_RELEASE_TAG }},openmetadata/server:latest" >> $GITHUB_OUTPUT + elif ${{ github.event_name == 'workflow_dispatch' && inputs.push_latest_tag_to_release }}; then + echo "tags=openmetadata/server:${{inputs.tag}},openmetadata/server:latest" >> $GITHUB_OUTPUT + else + echo "tags=openmetadata/server:${{ inputs.tag }}" >> $GITHUB_OUTPUT + fi + + - name: Build and push if event is workflow_dispatch and input is checked uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64,linux/arm64 push: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }} - - tags: 'openmetadata/server:${{ env.DOCKER_RELEASE_TAG }},openmetadata/server:latest' - file: ./docker/metadata/Dockerfile + tags: ${{ steps.input_check.outputs.tags }} + file: ./docker/metadata/Dockerfile \ No newline at end of file