This repository was archived by the owner on Dec 3, 2025. It is now read-only.
构建 Sub-Store Docker #441
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: 构建 Sub-Store Docker | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'main' | |
| paths-ignore: | |
| - 'dist/**' | |
| - 'README.md' | |
| schedule: | |
| - cron: "0 2 */3 * *" | |
| jobs: | |
| build_backend: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check Out | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| # 设置 docker 环境 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # docker login | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
| # build 并且 push docker 镜像 | |
| - name: Build and push | |
| id: docker_build_backend | |
| uses: docker/build-push-action@v3 | |
| with: | |
| network: host | |
| platforms: linux/amd64,linux/arm64 | |
| context: ./ | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ secrets.DOCKER_HUB_USERNAME }}/sub-store:latest | |
| # 打印 docker 镜像 SHA256 Hash 值 | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build_backend.outputs.digest }} |