mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-09 14:08:03 -05:00
120 lines
4.1 KiB
YAML
120 lines
4.1 KiB
YAML
name: Intermediate Docker
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
GO_VERSION:
|
|
description: "Go version"
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- "1.20"
|
|
- "1.20.14"
|
|
- "1.21"
|
|
- "1.21.13"
|
|
- "1.22"
|
|
- "1.22.12"
|
|
- "1.23"
|
|
- "1.23.7"
|
|
default: "1.21"
|
|
RUST_VERSION:
|
|
description: "Rust toolchain version"
|
|
required: true
|
|
type: choice
|
|
options:
|
|
- 1.86.0
|
|
- nightly-2025-08-18
|
|
default: "nightly-2025-08-18"
|
|
PYTHON_VERSION:
|
|
description: "Python version"
|
|
required: false
|
|
type: choice
|
|
options:
|
|
- "3.10"
|
|
default: "3.10"
|
|
CUDA_VERSION:
|
|
description: "Cuda version"
|
|
required: false
|
|
type: choice
|
|
options:
|
|
- "11.7.1"
|
|
- "12.2.2"
|
|
- "12.9.1"
|
|
default: "12.9.1"
|
|
CARGO_CHEF_TAG:
|
|
description: "Cargo chef version"
|
|
required: true
|
|
default: "0.1.41"
|
|
type: choice
|
|
options:
|
|
- 0.1.41
|
|
- 0.1.71
|
|
BASE_IMAGE:
|
|
description: "which intermediate image you want to update"
|
|
required: true
|
|
default: "go-alpine-builder"
|
|
type: choice
|
|
options:
|
|
- cuda-go-rust-builder
|
|
- go-rust-builder
|
|
- go-alpine-builder
|
|
- rust-builder
|
|
- rust-alpine-builder
|
|
- go-rust-alpine-builder
|
|
- py-runner
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: "build/dockerfiles/intermediate"
|
|
|
|
jobs:
|
|
build-and-publish-intermediate:
|
|
runs-on:
|
|
group: scroll-reth-runner-group
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: set tag env
|
|
run: |
|
|
if [ ${{github.event.inputs.BASE_IMAGE}} == "cuda-go-rust-builder" ]; then
|
|
echo "TAG=cuda-${{ github.event.inputs.CUDA_VERSION }}-go-${{ github.event.inputs.GO_VERSION }}-rust-${{ github.event.inputs.RUST_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "go-rust-builder" ]; then
|
|
echo "TAG=go-${{ github.event.inputs.GO_VERSION }}-rust-${{ github.event.inputs.RUST_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "go-alpine-builder" ]; then
|
|
echo "TAG=${{ github.event.inputs.GO_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "rust-builder" ]; then
|
|
echo "TAG=${{ github.event.inputs.RUST_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "rust-alpine-builder" ]; then
|
|
echo "TAG=${{ github.event.inputs.RUST_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "go-rust-alpine-builder" ]; then
|
|
echo "TAG=go-${{ github.event.inputs.GO_VERSION }}-rust-${{ github.event.inputs.RUST_VERSION }}" >> $GITHUB_ENV
|
|
elif [ ${{github.event.inputs.BASE_IMAGE}} == "py-runner" ]; then
|
|
echo "TAG=${{ github.event.inputs.PYTHON_VERSION }}" >> $GITHUB_ENV
|
|
else
|
|
echo "no BASE_IMAGE match"
|
|
fi
|
|
- name: Build image
|
|
id: build
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
file: build/dockerfiles/intermediate/${{ github.event.inputs.BASE_IMAGE }}.Dockerfile
|
|
platforms: linux/amd64,linux/arm64
|
|
tags: scrolltech/${{ github.event.inputs.BASE_IMAGE }}:${{ env.TAG }}
|
|
build-args: |
|
|
CUDA_VERSION=${{ github.event.inputs.CUDA_VERSION }}
|
|
GO_VERSION=${{ github.event.inputs.GO_VERSION }}
|
|
RUST_VERSION=${{ github.event.inputs.RUST_VERSION }}
|
|
PYTHON_VERSION=${{ github.event.inputs.PYTHON_VERSION }}
|
|
CARGO_CHEF_TAG=${{ github.event.inputs.CARGO_CHEF_TAG }}
|