Skip to content

Docker Build and Push #64

Docker Build and Push

Docker Build and Push #64

Workflow file for this run

name: Docker Build and Push
on:
push:
branches: [ "master" ]
workflow_dispatch: # 手动触发
schedule:
- cron: '0 0 * * *' # 每天 UTC 时间 00:00 (北京时间 08:00) 运行
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive' # 确保子模块也被检出
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push
run: |
docker build -t uniapi:latest .
docker tag uniapi:latest ryoshi541/uniapi:latest
docker push ryoshi541/uniapi:latest