Skip to content

Create and publish a Docker image #52

Create and publish a Docker image

Create and publish a Docker image #52

Workflow file for this run

name: Create and publish a Docker image
on:
push:
branches: ["martine"]
workflow_dispatch:
jobs:
build-docker-images:
strategy:
matrix:
target-cpu: ["skylake", "znver3", "znver2", "x86-64"]
env:
REGISTRY: ghcr.io
IMAGE_NAME: gateway-proxy
runs-on: ubuntu-latest
name: Build for ${{ matrix.target-cpu }}
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build and push Docker image - ${{ matrix.target-cpu }}
uses: whoan/docker-build-with-cache-action@v6
with:
username: MartineBot
password: "${{ secrets.GITHUB_TOKEN }}"
registry: "ghcr.io"
image_name: gateway-proxy
build_extra_args: '{"--build-arg": "TARGET_CPU=${{ matrix.target-cpu }}"}'
image_tag: "latest,${{ github.sha }},${{ matrix.target-cpu }}"