feat: Implement batch organizing functionality for library pages #55
This file contains hidden or 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: Docker Build on Self-hosted Runner | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| docker-build: | |
| runs-on: self-hosted | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Tag current image as previous | |
| run: | | |
| docker tag lcomplete/huntly:latest lcomplete/huntly:previous || true | |
| continue-on-error: true | |
| - name: Build Docker image | |
| run: | | |
| docker build -f Dockerfile.multistage -t lcomplete/huntly:latest . | |
| - name: Clean up old huntly images | |
| run: | | |
| # 保留 latest 和 previous,删除其他 huntly 镜像 | |
| docker images lcomplete/huntly --format "table {{.Repository}}:{{.Tag}}" | grep -v "latest\|previous\|REPOSITORY" | xargs -r docker rmi || true | |
| continue-on-error: true | |
| - name: Ensure data directory exists | |
| run: | | |
| mkdir -p ~/data/huntly | |
| - name: Restart service with Docker Compose | |
| run: | | |
| docker compose down || true | |
| docker compose up -d |