feat: fully integrate UI, embedding service, and discord bot. #1
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 & Publish Embedder Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| permissions: | |
| packages: write | |
| env: | |
| RELEASE_VERSION: ${{ github.ref_name }} | |
| jobs: | |
| build-and-publish: | |
| name: Build and Publish Docker Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v4 | |
| with: | |
| # list of Docker images to use as base name for tags | |
| images: | | |
| ghcr.io/${{ github.repository_owner }}/embedding-api | |
| # generate Docker tags based on the following events/attributes | |
| tags: | | |
| type=schedule | |
| type=ref,event=branch | |
| type=ref,event=pr | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| type=sha | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cache | |
| uses: actions/cache@v3 | |
| id: cache | |
| with: | |
| path: | | |
| target | |
| registry | |
| git | |
| key: cache-${{ hashFiles('Dockerfile') }} | |
| # Might be helpful later, but isn't working right now | |
| # - name: Inject Container Build Cache | |
| # uses: reproducible-containers/[email protected] | |
| # with: | |
| # cache-map: | | |
| # { | |
| # "registry": "/usr/local/cargo/registry/cache", | |
| # "idnex": "/usr/local/cargo/registry/index", | |
| # "git": "/usr/local/cargo/git/db", | |
| # "target": "/usr/src/embed-server/target" | |
| # } | |
| # skip-extraction: ${{ steps.cache.outputs.cache-hit }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |