File tree 6 files changed +58
-20
lines changed
6 files changed +58
-20
lines changed Original file line number Diff line number Diff line change 13
13
- name : Check out the repo
14
14
uses : actions/checkout@v3
15
15
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
16
23
- name : Log in to Docker Hub
17
24
uses : docker/login-action@v2
18
25
with :
24
31
with :
25
32
push : true
26
33
tags : beclab/go-dev:${{ github.event.inputs.tags }}
27
- file : containers/Dockerfile.dev.go
34
+ file : containers/Dockerfile.dev.go
35
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 13
13
- name : Check out the repo
14
14
uses : actions/checkout@v3
15
15
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
16
23
- name : Log in to Docker Hub
17
24
uses : docker/login-action@v2
18
25
with :
24
31
with :
25
32
push : true
26
33
tags : beclab/node-ts-dev:${{ github.event.inputs.tags }}
27
- file : containers/Dockerfile.dev.node-ts
34
+ file : containers/Dockerfile.dev.node-ts
35
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 13
13
- name : Check out the repo
14
14
uses : actions/checkout@v3
15
15
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
16
23
- name : Log in to Docker Hub
17
24
uses : docker/login-action@v2
18
25
with :
24
31
with :
25
32
push : true
26
33
tags : beclab/python-dev:${{ github.event.inputs.tags }}
27
- file : containers/Dockerfile.dev.python
34
+ file : containers/Dockerfile.dev.python
35
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -13,29 +13,24 @@ jobs:
13
13
- name : Check out the repo
14
14
uses : actions/checkout@v3
15
15
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
16
23
- name : Log in to Docker Hub
17
24
uses : docker/login-action@v2
18
25
with :
19
26
username : ${{ secrets.DOCKERHUB_USERNAME }}
20
27
password : ${{ secrets.DOCKERHUB_PASS }}
21
28
22
- - name : Download release check-chart
23
- uses : dsaltares/fetch-gh-release-asset@master
24
- with :
25
- file : check-chart_0.0.1_linux_amd64.tar.gz
26
- repo : beclab/check-chart
27
- target : check-chart.tar.gz
28
- version : tags/v0.0.1
29
- token : ${{ secrets.DOWNLOAD_TOKEN }}
30
-
31
- - name : unpack check-chart
32
- run : |
33
- tar zxvf check-chart.tar.gz
34
-
35
29
- name : Build and push Docker image
36
30
uses : docker/build-push-action@v3
37
31
with :
38
32
push : true
39
33
context : .
40
34
tags : beclab/devbox-server:${{ github.event.inputs.tags }}
41
- file : Dockerfile.server
35
+ file : Dockerfile.server
36
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 13
13
- name : Check out the repo
14
14
uses : actions/checkout@v3
15
15
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Set up Docker Buildx
20
+ id : buildx
21
+ uses : docker/setup-buildx-action@v3
22
+
16
23
- name : Log in to Docker Hub
17
24
uses : docker/login-action@v2
18
25
with :
43
50
context : .
44
51
push : true
45
52
tags : beclab/devbox:${{ github.event.inputs.tags }}
46
- file : Dockerfile
53
+ file : Dockerfile
54
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change 1
1
FROM golang:1.20.2 AS builder
2
+ ARG CHECK_CHART_VERSION=0.0.2
2
3
3
- RUN apt-get update && apt-get install -y gcc git musl-dev musl-tools
4
+ RUN apt-get update && apt-get install -y gcc git musl-dev musl-tools wget
4
5
5
6
WORKDIR /workspace
6
7
COPY . .
7
8
9
+ RUN case `uname -m` in \
10
+ x86_64) ARCH=amd64; ;; \
11
+ armv7l) ARCH=arm; ;; \
12
+ aarch64) ARCH=arm64; ;; \
13
+ ppc64le) ARCH=ppc64le; ;; \
14
+ s390x) ARCH=s390x; ;; \
15
+ *) echo "un-supported arch, exit ..."; exit 1; ;; \
16
+ esac && \
17
+ wget https://github.com/beclab/check-chart/releases/download/v${CHECK_CHART_VERSION}/check-chart_${CHECK_CHART_VERSION}_linux_${ARCH}.tar.gz -O - | tar -xz
18
+
8
19
RUN go mod download
9
- RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=musl-gcc CGO_LDFLAGS="-static" go build -ldflags="-s -w" -a -o devbox cmd/devbox/main.go
20
+ RUN CGO_ENABLED=1 CC=musl-gcc CGO_LDFLAGS="-static" go build -ldflags="-s -w" -a -o devbox cmd/devbox/main.go
10
21
11
22
12
23
FROM alpine:latest as builder2
You can’t perform that action at this time.
0 commit comments