Release version v0.14.1 (#897) #1
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: Build batch AI base docker image | |
| on: | |
| pull_request: | |
| paths: | |
| - "runner/**" | |
| - "!runner/.devcontainer/**" | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| paths: | |
| - "runner/**" | |
| - "!runner/.devcontainer/**" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ !((github.ref_type == 'branch' && github.ref_name == 'main') || github.ref_type == 'tag') }} | |
| jobs: | |
| docker: | |
| name: Docker image generation | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' | |
| permissions: | |
| packages: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Cleanup hosted runner | |
| uses: ./.github/actions/cleanup-runner | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: | | |
| livepeer/ai-runner | |
| tags: | | |
| type=sha | |
| type=ref,event=pr | |
| type=ref,event=tag | |
| type=sha,format=long | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{version}},prefix=v | |
| type=semver,pattern={{major}}.{{minor}},prefix=v | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=raw,value=base,enable={{is_default_branch}} | |
| type=raw,value=${{ github.event.pull_request.head.ref }} | |
| type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }} | |
| - name: Get version information (for docker build tag) | |
| id: version | |
| run: | | |
| echo "version=$(bash runner/print_version.sh)" >> "$GITHUB_OUTPUT" | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.CI_DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.CI_DOCKERHUB_TOKEN }} | |
| - name: Build and push runner docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: "{{defaultContext}}:runner" | |
| provenance: mode=max | |
| sbom: true | |
| push: true | |
| file: "docker/Dockerfile" | |
| build-args: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| platforms: linux/amd64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| annotations: ${{ steps.meta.outputs.annotations }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=registry,ref=livepeer/ai-runner:dockerbuildcache | |
| cache-to: type=registry,ref=livepeer/ai-runner:dockerbuildcache,mode=max | |
| - name: Notify new build upload | |
| run: curl -X POST https://holy-bread-207a.livepeer.workers.dev | |