Fix oss client create function (#1012) #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Images - unitycatalog | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| branches: | |
| - main | |
| paths: | |
| - build/** | |
| - project/** | |
| - examples/** | |
| - server/** | |
| - api/** | |
| - clients/python/** | |
| - version.sbt | |
| - build.sbt | |
| workflow_dispatch: {} | |
| env: | |
| IMAGE: unitycatalog/unitycatalog | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| # Required for multi-arch builds | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Will generate tags for the image | |
| # For ref/tags/*: latest, <tag> | |
| # For refs/heads/main: main, main-<short-sha> | |
| - name: Generate Metadata and Tags | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.IMAGE }} | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=sha,enable=${{ github.ref == 'refs/heads/main' }},prefix={{branch}}- | |
| - name: Login to Docker Hub | |
| if: ${{ contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') }} | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and Push Docker Image | |
| if: ${{ contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') }} | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| # Push only tagged releases to registry. Eg. the git ref | |
| # "refs/tags/v0.2.0" would result the tagged image | |
| # "unitycatalog/unitycatalog:v0.2.0". | |
| # See here for more info: https://tinyurl.com/yh8252m2 | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| # Use github actions cache: https://docs.docker.com/build/cache/backends/gha/ | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |