diff --git a/.github/workflows/docker-openmetadata-postgres.yml b/.github/workflows/docker-openmetadata-postgres.yml new file mode 100644 index 00000000000..0bdc0ba1859 --- /dev/null +++ b/.github/workflows/docker-openmetadata-postgres.yml @@ -0,0 +1,56 @@ +# Copyright 2021 Collate +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: docker-openmetadata-postgres-db docker +on: + workflow_dispatch: + inputs: + tag: + description: "Input tag" + required: true + release: + types: [published] + +jobs: + push_to_docker_hub: + runs-on: ubuntu-latest + env: + input: ${{ github.event.inputs.tag }} + + steps: + - name: Check trigger type + if: ${{ env.input == '' }} + run: echo "input=0.10.4" >> $GITHUB_ENV + + - name: Check out the Repo + uses: actions/checkout@v2 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_OPENMETADATA_USERNAME }} + password: ${{ secrets.DOCKERHUB_OPENMETADATA_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name == 'release' }} + # Update tags before every release + tags: 'openmetadata/postgres:${{ env.input }},openmetadata/postgres:latest' + file: ./docker/local-metadata/Dockerfile_postgres