Skip to content

Merge pull request #7 from zk-org/fix_linux-amd64 #4

Merge pull request #7 from zk-org/fix_linux-amd64

Merge pull request #7 from zk-org/fix_linux-amd64 #4

Workflow file for this run

name: build
on: [push, workflow_dispatch]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
tag: [alpine-amd64, alpine-arm64, alpine-i386, linux-amd64, linux-arm64, linux-i386]
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:${{ matrix.tag }}"
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max