forked from apache/celeborn
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 1.48 KB
/
docker-build.yml
File metadata and controls
46 lines (40 loc) · 1.48 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
name: Build and Push Celeborn Docker Images
on:
release:
types: [published]
workflow_dispatch:
inputs:
celeborn_version:
description: 'Celeborn version (e.g., 0.3.0)'
required: false # Making it optional for release triggers
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set Celeborn Version
id: set_version
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
VERSION="${{ github.event.release.tag_name }}"
echo "VERSION=${VERSION#v}" >> $GITHUB_OUTPUT
else
VERSION="${{ github.event.inputs.celeborn_version }}"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
fi
- name: Download Celeborn Release
run: |
VERSION="${{ steps.set_version.outputs.VERSION }}"
wget https://downloads.apache.org/celeborn/celeborn-${VERSION}/apache-celeborn-${VERSION}-bin.tgz
tar -xzf apache-celeborn-${VERSION}-bin.tgz
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push
run: |
VERSION="${{ steps.set_version.outputs.VERSION }}"
cd apache-celeborn-${VERSION}-bin
docker buildx create --use
docker buildx build --push -f docker/Dockerfile --platform=linux/amd64,linux/arm64 -t apache/celeborn:${VERSION} .