This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch refactor-with-go
in repository https://gitbox.apache.org/repos/asf/dubbo-admin.git
The following commit(s) were added to refs/heads/refactor-with-go by this push:
new 984c80a Add ca deploy action
984c80a is described below
commit 984c80a9a537bf1bf61c00006dd0327d1542afeb
Author: Albumen Kevin <[email protected]>
AuthorDate: Mon Feb 27 09:51:51 2023 +0800
Add ca deploy action
---
.github/workflows/deploy-ca.yml | 26 ++++++++++++++++++++++++++
ca/Dockerfile | 7 +------
2 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/deploy-ca.yml b/.github/workflows/deploy-ca.yml
new file mode 100644
index 0000000..9163e12
--- /dev/null
+++ b/.github/workflows/deploy-ca.yml
@@ -0,0 +1,26 @@
+name: Deploy CA
+
+on:
+ push:
+ branches:
+ - 'refactor-with-go'
+
+jobs:
+ docker:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v2
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ - name: Login to DockerHub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ - name: Build and push
+ uses: docker/build-push-action@v2
+ with:
+ push: true
+ context: ca
+ tags: apache/dubbo-ca:dev
diff --git a/ca/Dockerfile b/ca/Dockerfile
index 2ffe04d..38febab 100644
--- a/ca/Dockerfile
+++ b/ca/Dockerfile
@@ -1,6 +1,4 @@
-FROM golang:1.20.1-alpine3.17 as builder
-
-RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g'
/etc/apk/repositories
+FROM golang:latest as builder
RUN apk --update add gcc libc-dev upx ca-certificates && update-ca-certificates
@@ -9,7 +7,6 @@ ADD . /workspace
WORKDIR /workspace
RUN --mount=type=cache,target=/go \
- env GOPROXY=https://goproxy.cn,direct \
go build -buildmode=pie -ldflags "-linkmode external -extldflags -static -w"
\
-o /workspace/ca
@@ -18,8 +15,6 @@ FROM alpine:3.17
EXPOSE 30060
EXPOSE 30062
-RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g'
/etc/apk/repositories
-
COPY --from=builder /workspace/ca /ca
CMD ["/ca"]