Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: vec-282 add upload-images.yml which builds and uploads quote and prism… #51

Merged
merged 3 commits into from
Aug 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions .github/workflows/upload-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Build and Push Docker Images

on:
workflow_dispatch:
release:
types: [published]

jobs:
setup:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
steps:
- uses: actions/checkout@v4
name: Checkout code
with:
fetch-depth: 1
fetch-tags: true

- name: Get release tag
id: get-tag
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
fi
shell: bash

build-push-quote-search-preview:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push quote search preview Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./.internal/Dockerfile-quote-search-preview
platforms: linux/amd64,linux/arm64
push: true
tags: aerospike/quote-search-example:preview

build-push-quote-search:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push quote search Docker image
uses: docker/build-push-action@v6
with:
context: ./quote-semantic-search
file: ./quote-semantic-search/Dockerfile-quote-search
platforms: linux/amd64,linux/arm64
push: true
tags: |
aerospike/quote-search-example:latest
aerospike/quote-search-example:${{ needs.setup.outputs.tag }}

build-push-prism-search:
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push prism search Docker image
uses: docker/build-push-action@v6
with:
context: ./quote-semantic-search
file: ./quote-semantic-search/Dockerfile-prism
platforms: linux/amd64,linux/arm64
push: true
tags: |
aerospike/prism-search-example:latest
aerospike/prism-search-example:${{ needs.setup.outputs.tag }}