Skip to content

Manual Publish to Docker Hub #7

Manual Publish to Docker Hub

Manual Publish to Docker Hub #7

name: Manual Publish to Docker Hub
on:
workflow_dispatch:
inputs:
version:
description: "Docker image version"
required: true
default: "latest"
jobs:
docker-build-push:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
layout:
[
"dex",
"recursive",
"recursive_with_poseidon",
"small",
"starknet",
"starknet_with_keccak",
]
hash: ["blake2s", "keccak"]
max-parallel: 3
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Create remote Kubernetes builder
run: |
echo "${{ secrets.BUILDKIT_CA_PEM }}" > client-ca.pem
echo "${{ secrets.BUILDKIT_CERT_PEM }}" > client-cert.pem
echo "${{ secrets.BUILDKIT_KEY_PEM }}" > client-key.pem
docker buildx create \
--name remote-kubernetes \
--driver remote \
--driver-opt cacert=$(pwd)/client-ca.pem,cert=$(pwd)/client-cert.pem,key=$(pwd)/client-key.pem \
tcp://buildkit.iosis.tech:30500
docker buildx use remote-kubernetes
docker buildx inspect --bootstrap
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: runtime.dockerfile
tags: "okm165/swiftness:${{ github.event.inputs.version }}-${{ matrix.layout }}-${{ matrix.hash }}"
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
build-args: |
FEATURES=${{ matrix.layout }},${{ matrix.hash }}