mirror of
https://github.com/Jinnrry/PMail.git
synced 2025-02-20 11:43:09 +08:00
fix
This commit is contained in:
parent
4b06ddbd29
commit
8a3ee3808f
5
.github/workflows/docker_build.yml
vendored
5
.github/workflows/docker_build.yml
vendored
@ -22,6 +22,7 @@ jobs:
|
||||
echo "${GITHUB_REF/refs\/tags\//}"
|
||||
echo "${GITHUB_REF#refs/*/}"
|
||||
echo "${GITHUB_REF}"
|
||||
echo "GITHASH=${git show -s --format=%H}" >> ${GITHASH}
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: set lower case repository name
|
||||
@ -51,7 +52,9 @@ jobs:
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
build-args: VERSION=${{ env.VERSION }}
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
GITHASH=${{ env.GITHASH }}
|
||||
context: .
|
||||
file: ./DockerfileGithubAction
|
||||
platforms: |
|
||||
|
5
.github/workflows/docker_build_pre.yml
vendored
5
.github/workflows/docker_build_pre.yml
vendored
@ -22,6 +22,7 @@ jobs:
|
||||
echo "${GITHUB_REF/refs\/tags\//}"
|
||||
echo "${GITHUB_REF#refs/*/}"
|
||||
echo "${GITHUB_REF}"
|
||||
echo "GITHASH=${git show -s --format=%H}" >> ${GITHASH}
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: set lower case repository name
|
||||
@ -51,7 +52,9 @@ jobs:
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
build-args: VERSION=${{ env.VERSION }}
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
GITHASH=${{ env.GITHASH }}
|
||||
context: .
|
||||
file: ./DockerfileGithubAction
|
||||
platforms: |
|
||||
|
@ -1,11 +1,12 @@
|
||||
FROM golang:alpine as serverbuild
|
||||
ARG VERSION
|
||||
ARG GITHASH
|
||||
WORKDIR /work
|
||||
|
||||
COPY server .
|
||||
|
||||
RUN apk update && apk add git
|
||||
RUN go build -ldflags "-s -w -X 'main.version=${VERSION}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go
|
||||
RUN go build -ldflags "-s -w -X 'main.version=${VERSION}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=${GITHASH}' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go
|
||||
RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push telegram_push.go
|
||||
RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push web_push.go
|
||||
RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push wechat_push.go
|
||||
|
Loading…
x
Reference in New Issue
Block a user