Publish docker image #9
Workflow file for this run
This file contains 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: 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/fhevm-coprocessor | |
jobs: | |
push_to_registry: | |
name: Push Docker image to GitHub Container Registry | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
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 | |
- 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 |