-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add upload-images.yml which builds and uploads quote and prism…
… example images to dockerhub
- Loading branch information
1 parent
fef7a21
commit 253cae6
Showing
1 changed file
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Build and Push Docker Images | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.get-tag.outputs.tag }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout code | ||
|
||
- name: Get latest Git tag | ||
id: get-tag | ||
run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
build-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 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@v5 | ||
with: | ||
context: . | ||
file: ./.internal/Dockerfile-quote-search-preview | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: aerospike/quote-search-example:preview | ||
|
||
build-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 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 latest and tagged Docker image | ||
uses: docker/build-push-action@v5 | ||
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-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 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 latest and tagged Docker image | ||
uses: docker/build-push-action@v5 | ||
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 }} |