Spaces:
Sleeping
Sleeping
Download .github/workflows/docker.yml from taigatakano/labtool_docker: direct link, hf CLI and curl.
- Browser
- Download file 958 Bytes
-
https://huggingface.co/spaces/taigatakano/labtool_docker/resolve/main/.github/workflows/docker.yml
- Command line
-
hf download hf://spaces/taigatakano/labtool_docker/.github/workflows/docker.yml
-
curl -L -o docker.yml https://huggingface.co/spaces/taigatakano/labtool_docker/resolve/main/.github/workflows/docker.yml
958 Bytes
| name: Docker Build and Push to GHCR | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Log in to GitHub Container Registry | |
| if: github.event_name == 'push' | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker image | |
| run: | | |
| docker build -t ghcr.io/${{ github.repository }}_dev:latest --target builder_image . | |
| docker build -t ghcr.io/${{ github.repository }}:latest --target release_image . | |
| - name: Push Docker image | |
| if: github.event_name == 'push' | |
| run: | | |
| docker push ghcr.io/${{ github.repository }}_dev:latest | |
| docker push ghcr.io/${{ github.repository }}:latest | |