Skip to content

Commit

Permalink
use actions to build docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkatse committed Aug 20, 2022
1 parent 3d3200a commit 2417c00
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker-buildx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Buildx Docker image

on:
push:
branches:
- 'master'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'

jobs:
buildx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Get current date
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%d')"
-
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@v3
with:
context: .
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7,linux/arm/v6
push: true
tags: |
user/app:latest
user/app:${{ steps.date.outputs.today }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ docker-compose logs -f

每次运行Docker容器后,容器内将自动按照参数执行签到活动,签到完成后容器将默认在每天上午9:30运行一次,如果想自行修改时间可自行编辑`docker-compose.yml`文件中的`CRON_SIGNIN`,将其修改成想运行的时间。

若想要更新容器镜像,可以参考以下命令
```text
docker-compose stop
docker-compose pull && docker-compose up -d
```

## 使用python运行(screen)

1. 将本项目Clone至本地后,安装好依赖直接运行`python3 server.py`
Expand Down

0 comments on commit 2417c00

Please sign in to comment.