Skip to content

buildx-buildkit

buildx-buildkit #6

Workflow file for this run

name: buildx-buildkit
on:
workflow_dispatch:
inputs:
source-tag:
description: 'BuildKit source Docker tag'
required: true
default: 'master'
jobs:
build:
runs-on: ubuntu-24.04
steps:
-
name: Checkout source
uses: actions/checkout@v4
with:
repository: moby/buildkit
ref: ${{ github.event.inputs.source-tag }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
-
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Create Dockerfile
run: |
wget -O Dockerfile.loong64 https://github.com/loong64/buildkit/raw/refs/heads/master/Dockerfile
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.loong64
platforms: linux/loong64
push: true
build-args: |
BUILDPLATFORM=linux/loong64
tags: ghcr.io/${{ github.repository_owner }}/buildkit:buildx-stable-1
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true
cache-from: type=gha
cache-to: type=gha,mode=max