update #27
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
name: docling | |
# 触发工作流的事件 | |
on: | |
push: # 设置为在 push 到 main 分支时触发 | |
branches: | |
- main | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 拉取当前仓库代码 | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# 设置 Docker 构建环境 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Pull and Save Docker images | |
run: | | |
git clone https://github.com/DS4SD/docling.git | |
# 登录到 Docker Hub | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./docling | |
file: ./docling/Dockerfile | |
tags: ${{ secrets.DOCKER_USERNAME }}/docling:main | |
load: true | |
push: true # 是否推送镜像到 Docker Hub |