-
Notifications
You must be signed in to change notification settings - Fork 4
85 lines (78 loc) · 2.91 KB
/
create_release_image.yml
File metadata and controls
85 lines (78 loc) · 2.91 KB
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
name: Create container for head_sha
# builds images for nebuli, worker for the given head_sha (brach, tag, or commit sha)
# and publishes the images to nebulastream/nebuli and nebulastream/worker,
# tagged as specified via the parameter.
on:
workflow_call:
inputs:
head_sha:
description: 'head_sha to build docker executable images for'
required: true
type: string
dockerhub-tag:
description: 'tag to tag the image on dockerhub with'
required: true
type: string
jobs:
get-dev-images:
uses: ./.github/workflows/get_dev_images.yml
secrets: inherit
with:
head_sha: ${{ inputs.head_sha }}
build-image:
runs-on: [ self-hosted, linux, Build, "${{matrix.arch}}" ]
needs: [ get-dev-images ]
strategy:
fail-fast: false
matrix:
arch: [ x64, arm64 ]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_SECRET }}
- name: Build Nebuli Image
uses: docker/build-push-action@v6
with:
push: true
tags: nebulastream/nebuli:${{ inputs.dockerhub-tag }}-${{ matrix.arch }}
build-args: |
TAG=${{ needs.get-dev-images.outputs.image-tag }}
context: .
file: ${{ github.workspace }}/docker/nebuli/Nebuli.dockerfile
- name: Build single-node worker
uses: docker/build-push-action@v6
with:
push: true
tags: nebulastream/worker:${{ inputs.dockerhub-tag }}-${{ matrix.arch }}
build-args: |
TAG=${{ needs.get-dev-images.outputs.image-tag }}
context: .
file: ${{ github.workspace }}/docker/single-node-worker/SingleNodeWorker.dockerfile
merge-images:
name: "Merge images for different platforms into a single Multi-Platform image"
needs: [ build-image ]
runs-on: [ self-hosted, linux, Build ]
steps:
- name: Login to Docker Hub
if: ${{ !github.event.act }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER_NAME }}
password: ${{ secrets.DOCKER_SECRET }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Combine Manifests
run: |
docker buildx imagetools create -t nebulastream/nebuli:${{ inputs.dockerhub-tag }} \
nebulastream/nebuli:${{ inputs.dockerhub-tag }}-x64 \
nebulastream/nebuli:${{ inputs.dockerhub-tag }}-arm64
docker buildx imagetools create -t nebulastream/worker:${{ inputs.dockerhub-tag }} \
nebulastream/worker:${{ inputs.dockerhub-tag }}-x64 \
nebulastream/worker:${{ inputs.dockerhub-tag }}-arm64