Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit b68c9e2

Browse files
init
1 parent ade71ae commit b68c9e2

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

.github/workflows/build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: docker_duildx
2+
on:
3+
push:
4+
branches: ["master"]
5+
paths:
6+
- "docker/**"
7+
- ".github/workflows/**"
8+
pull_request:
9+
branches: ["master"]
10+
paths:
11+
- "docker/**"
12+
- ".github/workflows/**"
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
NAME_TAG: ghcr.io/rootshell-coder/docker:0.15.1-buildx
17+
LATEST_TAG: ghcr.io/rootshell-coder/docker:buildx
18+
19+
jobs:
20+
test:
21+
runs-on: [ubuntu-latest]
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Build Test
25+
run: docker buildx build -f docker/Dockerfile docker
26+
27+
push:
28+
needs: [test]
29+
name: Publish to github registry
30+
runs-on: [ubuntu-latest]
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v3
38+
- name: Login to Docker Hub
39+
uses: docker/login-action@v3
40+
with:
41+
registry: ${{ env.REGISTRY }}
42+
username: ${{ github.actor }}
43+
password: ${{ secrets.GITHUB_TOKEN }}
44+
- name: Build and push
45+
uses: docker/build-push-action@v5
46+
with:
47+
context: docker
48+
push: true
49+
platforms: linux/amd64,linux/arm64
50+
tags: |
51+
${{ env.LATEST_TAG }}
52+
${{ env.NAME_TAG }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# docker
1+
# docker:buildx

docker/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM docker:dind
2+
ENV DOCKER_CLI_EXPERIMENTAL=enabled
3+
RUN mkdir -p ~/.docker/cli-plugins
4+
ADD https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64 /root/.docker/cli-plugins/docker-buildx
5+
RUN chmod a+x /root/.docker/cli-plugins/docker-buildx

0 commit comments

Comments
 (0)