Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/MojoLlama/blob/main/.github/workflows/docker-publish.yml # MojoLlama Archived Mojo/MAX quantizer and serving research repository (read-only history) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `MojoLlama / .github / workflows / docker-publish.yml` 82 lines ยท 2407 bytes Raw Blame History 1 name: Build and publish Docker images 2 3 on: 4 push: 5 branches: [main] 6 tags: 7 - "v*" 8 pull_request: 9 branches: [main] 10 workflow_dispatch: 11 12 env: 13 REGISTRY: ghcr.io 14 IMAGE_NAME: ${{ github.repository }} 15 16 jobs: 17 build-and-push: 18 runs-on: ubuntu-latest 19 permissions: 20 contents: read 21 packages: write 22 strategy: 23 fail-fast: false 24 matrix: 25 include: 26 - name: cpu 27 dockerfile: Dockerfile 28 tag-suffix: cpu 29 - name: cuda 30 dockerfile: docker/Dockerfile.cuda 31 tag-suffix: cuda 32 - name: rocm 33 dockerfile: docker/Dockerfile.rocm 34 tag-suffix: rocm 35 - name: vulkan 36 dockerfile: docker/Dockerfile.vulkan 37 tag-suffix: vulkan 38 - name: sycl 39 dockerfile: docker/Dockerfile.sycl 40 tag-suffix: sycl 41 42 steps: 43 - name: Checkout repository 44 uses: actions/checkout@v4 45 46 - name: Free disk space 47 run: | 48 sudo rm -rf /usr/share/dotnet 49 sudo rm -rf /opt/ghc 50 sudo rm -rf /usr/local/share/boost 51 sudo rm -rf "$AGENT_TOOLSDIRECTORY" 52 sudo docker image prune -af 53 df -h 54 55 - name: Log in to GitHub Container Registry 56 uses: docker/login-action@v3 57 with: 58 registry: ${{ env.REGISTRY }} 59 username: ${{ github.actor }} 60 password: ${{ secrets.GITHUB_TOKEN }} 61 62 - name: Extract Docker metadata 63 id: meta 64 uses: docker/metadata-action@v5 65 with: 66 images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 67 tags: | 68 type=semver,pattern={{version}}-${{ matrix.tag-suffix }} 69 type=semver,pattern={{major}}.{{minor}}-${{ matrix.tag-suffix }} 70 type=ref,event=branch,suffix=-${{ matrix.tag-suffix }} 71 type=sha,prefix=,suffix=-${{ matrix.tag-suffix }} 72 type=raw,value=latest-${{ matrix.tag-suffix }},enable={{is_default_branch}} 73 type=raw,value=${{ matrix.tag-suffix }},enable={{is_default_branch}} 74 75 - name: Build and push Docker image 76 uses: docker/build-push-action@v6 77 with: 78 context: . 79 file: ${{ matrix.dockerfile }} 80 push: ${{ github.event_name != 'pull_request' }} 81 tags: ${{ steps.meta.outputs.tags }} 82 labels: ${{ steps.meta.outputs.labels }}