Skip to content

Commit

Permalink
feat: 添加 Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jan 10, 2025
1 parent dc3ce63 commit 56abce8
Show file tree
Hide file tree
Showing 4 changed files with 559 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
* text=lf
52 changes: 52 additions & 0 deletions .github/workflows/buildkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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 DockerHub
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

Loading

0 comments on commit 56abce8

Please sign in to comment.