diff --git a/metadata-ingestion/.github/workflows/docker-frontend.yml b/metadata-ingestion/.github/workflows/docker-frontend.yml new file mode 100644 index 00000000000..500cc5071b5 --- /dev/null +++ b/metadata-ingestion/.github/workflows/docker-frontend.yml @@ -0,0 +1,56 @@ +name: datahub-ingest docker +on: + push: + branches: + - main + paths-ignore: + - 'docs/**' + - '**.md' + pull_request: + branches: + - main + paths: + - 'docker/**' + - '.github/workflows/docker-frontend.yml' + paths_ignore: + - '**.md' + - '**.env' + release: + types: [published, edited] + +jobs: + setup: + runs-on: ubuntu-latest + outputs: + tag: ${{ steps.tag.outputs.tag }} + publish: ${{ steps.publish.outputs.publish }} + steps: + - uses: actions/checkout@v2 + - id: tag + run: | + echo "GITHUB_REF: $GITHUB_REF" + TAG=$(echo ${GITHUB_REF} | sed -e 's,refs/heads/master,latest,g' -e 's,refs/tags/,,g' -e 's,refs/pull/\([0-9]*\).*,pr\1,g') + echo "tag=$TAG" + echo "::set-output name=tag::$TAG" + - name: Check whether publishing enabled + id: publish + env: + ENABLE_PUBLISH: ${{ secrets.DOCKER_PASSWORD }} + run: | + echo "Enable publish: ${{ env.ENABLE_PUBLISH != '' }}" + echo "::set-output name=publish::${{ env.ENABLE_PUBLISH != '' }}" + build-and-publish-dockerhub: + runs-on: ubuntu-latest + needs: setup + steps: + - uses: actions/checkout@v2 + - uses: docker/build-push-action@v1 + env: + DOCKER_BUILDKIT: 1 + with: + dockerfile: ./docker/Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: acryldata/designpartners + tags: ${{ needs.setup.outputs.tag }} + push: ${{ needs.setup.outputs.publish == 'true' }} diff --git a/metadata-ingestion/Dockerfile b/metadata-ingestion/docker/Dockerfile similarity index 100% rename from metadata-ingestion/Dockerfile rename to metadata-ingestion/docker/Dockerfile