refactor: obsolete utilities and deprecated functions Remove code blo… #25
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: Publish Docker image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - "v*.*.*" | |
| paths-ignore: | |
| - 'cuda/**' | |
| - 'docs/**' | |
| - '**.md' | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'cuda/**' | |
| - 'docs/**' | |
| - '**.md' | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| build-and-push: | |
| name: Build & push to ghcr.io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set lowercase image name | |
| id: image | |
| run: | | |
| echo "name=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to ghcr.io | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }} | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=ref,event=pr | |
| - name: Build and push Docker image (CPU) | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| BASE_IMAGE=ubuntu:24.04 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Image published | |
| if: github.event_name != 'pull_request' | |
| run: | | |
| echo "Image published to GitHub Packages" | |
| echo "" | |
| echo "Pull with:" | |
| echo " docker pull ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest" | |
| echo "" | |
| echo "Or via docker-compose:" | |
| echo " image: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest" |