Build and Push Celeborn Docker Images #5
This file contains hidden or 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
| 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} . |