Download .github/workflows/docker.yml from linuxrun/webrtc: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/linuxrun/webrtc/resolve/main/.github/workflows/docker.yml
- Command line
-
hf download hf://spaces/linuxrun/webrtc/.github/workflows/docker.yml
-
curl -L -o docker.yml https://huggingface.co/spaces/linuxrun/webrtc/resolve/main/.github/workflows/docker.yml
1.18 kB
| name: Build and Push Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main # 在 main 分支有提交时自动触发 | |
| - master | |
| workflow_dispatch: # 允许手动触发(在GitHub界面点击运行) | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 检出代码 | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # 设置 QEMU 支持多架构构建 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| # 设置 Docker Buildx | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # 登录 Docker Hub | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # 构建并推送镜像 | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . # 构建上下文为仓库根目录 | |
| file: ./Dockerfile # Dockerfile路径 | |
| platforms: linux/amd64,linux/arm64 # 多架构支持 | |
| push: true | |
| tags: ${{ secrets.DOCKERHUB_USER }}/filetransfer:latest | |