Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit ad278ae
Merge: 1b616ee ba8fb1d
Author: LiDong <[email protected]>
Date:   Tue Aug 9 13:51:17 2022 +0800

    Merge branch 'dev' of github.com:hjmcloud/hjm-certcheck into dev

commit 1b616ee
Author: LiDong <[email protected]>
Date:   Tue Aug 9 13:51:10 2022 +0800

    add docker publish task

commit ba8fb1d
Author: 李栋 <[email protected]>
Date:   Mon Aug 8 19:43:43 2022 +0800

    fix homepage

commit afd9430
Merge: 01a53b2 6852109
Author: 李栋 <[email protected]>
Date:   Mon Aug 8 19:29:32 2022 +0800

    Merge branch 'master' into dev

commit 01a53b2
Author: 李栋 <[email protected]>
Date:   Mon Aug 8 19:24:11 2022 +0800

    change build auto tag

commit 2526f73
Author: LiDong <[email protected]>
Date:   Mon Aug 8 17:31:39 2022 +0800

    default version set to development

commit d423ba6
Author: LiDong <[email protected]>
Date:   Mon Aug 8 16:47:06 2022 +0800

    change README
  • Loading branch information
gcslaoli committed Aug 9, 2022
1 parent 6852109 commit 58816d7
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,46 @@ jobs:
with:
asset_paths: '["temp/${{env.BIN_NAME}}_*"]'

##############################################################################################
# 以下为Docker镜像的构建 #
# 需要提前配置好 secrets.DOCKERHUB_USERNAME secrets.DOCKERHUB_PASSWORD #
# Dockerfile文件默认在 ./Dockerfile #
##############################################################################################
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
with:
install: true
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{github.repository}}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang AS download
WORKDIR /tmp
RUN curl -L -o hjm-certcheck https://github.com/hjmcloud/hjm-certcheck/releases/latest/download/hjm-certcheck_linux_$(go env GOARCH)

FROM alpine
ENV WORKDIR /app
ADD resource $WORKDIR/
# ADD ./temp/linux_amd64/main $WORKDIR/main
COPY --from=download /tmp/hjm-certcheck $WORKDIR/hjm-certcheck
RUN chmod +x $WORKDIR/hjm-certcheck

###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
CMD ./hjm-certcheck
2 changes: 1 addition & 1 deletion internal/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var (
// 生成sVersion结构体
res := sVersion{
Name: "hjm-certcheck",
Homepage: "https://gitee.com/hjmcloud/hjm-certcheck",
Homepage: "https://hjmcloud.cn/hjm-certcheck",
Version: data["version"].(string),
GoFrame: info.GoFrame,
Golang: info.Golang,
Expand Down

0 comments on commit 58816d7

Please sign in to comment.