-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (95 loc) · 2.98 KB
/
upload-images.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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: 0
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 }}