Manual Publish to Docker Hub #3
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: 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"] | |
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 | |
driver: docker-container | |
- 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 }} |