update vector-serve dependencies for security patches (#268) #6
Workflow file for this run
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: Vectorize Server Release (tag) | |
| on: | |
| push: | |
| tags: ['v[0-9]+.[0-9]+.[0-9]+'] | |
| jobs: | |
| build_and_push_amd64: | |
| name: Build and push AMD64 images (tag) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Extract tag | |
| id: tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push -- Tag | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./server/Dockerfile | |
| platforms: linux/amd64 | |
| push: true | |
| tags: | | |
| ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }}-amd64 | |
| ghcr.io/chuckhend/vectorize-server:latest-amd64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| provenance: true | |
| sbom: true | |
| build_and_push_arm64: | |
| name: Build and push ARM64 images (tag) | |
| runs-on: ubicloud-standard-2-arm-ubuntu-2204 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Extract tag | |
| id: tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push -- Tag | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./server/Dockerfile | |
| platforms: linux/arm64 | |
| push: true | |
| tags: | | |
| ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }}-arm64 | |
| ghcr.io/chuckhend/vectorize-server:latest-arm64 | |
| provenance: true | |
| sbom: true | |
| create_manifest: | |
| name: Create and Push Manifest (tag) | |
| runs-on: ubuntu-latest | |
| needs: [build_and_push_arm64, build_and_push_amd64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract tag | |
| id: tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Create and push Docker manifest — Version and latest | |
| run: | | |
| # Create a multi-arch image manifest for the version tag | |
| docker buildx imagetools create \ | |
| --tag ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }} \ | |
| ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }}-arm64 \ | |
| ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }}-amd64 | |
| # Inspect the created version manifest to ensure it's correct | |
| docker buildx imagetools inspect ghcr.io/chuckhend/vectorize-server:${{ steps.tag.outputs.TAG }} | |
| # Create/update the 'latest' multi-arch manifest pointing to the architecture-specific latest tags | |
| docker buildx imagetools create \ | |
| --tag ghcr.io/chuckhend/vectorize-server:latest \ | |
| ghcr.io/chuckhend/vectorize-server:latest-arm64 \ | |
| ghcr.io/chuckhend/vectorize-server:latest-amd64 | |
| # Inspect the created latest manifest | |
| docker buildx imagetools inspect ghcr.io/chuckhend/vectorize-server:latest |