Skip to content

Publish docker image #3

Publish docker image

Publish docker image #3

Workflow file for this run

name: Publish docker image
on:
workflow_dispatch:
inputs:
image_tag:
description: 'Image (to be built/pushed) tag (default: latest)'
default: "latest"
type: string
required: false
ref_to_geth:
description: 'Branch, tag or commit SHA1 to checkout fhevm-backend'
required: true
default: "main"
type: string
env:
DOCKER_IMAGE: ghcr.io/zama-ai/coprocessor
jobs:
push_to_registry:
name: Push Docker image to GitHub Container Registry
runs-on: ubuntu-latest
permissions:
packages: write
steps:
# space wasn't enough at some point
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be
- name: Check out repo
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ inputs.ref_to_geth }}
lfs: true
- name: Check OS
run: |
lscpu
uname -r
lsb_release -a
- name: Login to GitHub Container Registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: fhevm-engine/coprocessor/Dockerfile
push: true
pull: true
platforms: linux/amd64,linux/arm64
tags: ${{ env.DOCKER_IMAGE }}:${{ inputs.image_tag }},${{ env.DOCKER_IMAGE }}:latest