-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e1434e
commit 6520e04
Showing
4 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: 'publish docker' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: '版本号' | ||
required: true | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
if: github.event.repository.owner.id == github.event.sender.id | ||
steps: | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Dockerfile | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
happy888888/weibotask:${{ github.event.inputs.version }} | ||
happy888888/weibotask:latest | ||
- name: Build Dockerfile-arm | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/arm/v7 | ||
push: true | ||
tags: | | ||
happy888888/weibotask:arm-${{ github.event.inputs.version }} | ||
happy888888/weibotask:arm-latest | ||
- name: Build Dockerfile-arm64 | ||
uses: docker/build-push-action@v2 | ||
with: | ||
platforms: linux/arm64 | ||
push: true | ||
tags: | | ||
happy888888/weibotask:arm64-${{ github.event.inputs.version }} | ||
happy888888/weibotask:arm64-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM golang:1.15.6-alpine3.12 as builder | ||
WORKDIR /go | ||
COPY ./src ./src | ||
RUN CGO_ENABLED=0 GOPATH=$(pwd) go install -ldflags "-s -w" WeiboTask | ||
|
||
FROM alpine:3.12 | ||
LABEL maintainer="星辰" | ||
|
||
RUN apk update \ | ||
&& apk add tzdata \ | ||
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
&& echo "Asia/Shanghai" > /etc/timezone | ||
|
||
COPY --from=builder /go/bin/WeiboTask /usr/bin/WeiboTask | ||
|
||
ENTRYPOINT ["/usr/bin/WeiboTask", "-L"] | ||
CMD ["-l", "/tmp/WeiboTask.log"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ WeiboTask | |
|
||
### 💥主要功能 | ||
* [x] 微博超话签到 | ||
* [ ] 每日积分获取 | ||
* [x] 每日积分获取 | ||
|
||
</br> | ||
|
||
|