Merge pull request #60 from Zektopic/add-best-objects-lock-1386227230… #54
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: CI ROCm | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - dev | |
| - master | |
| paths-ignore: | |
| - "docs/**" | |
| # only run the latest commit to avoid cache overwrites | |
| concurrency: | |
| group: rocm-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| PYTHON_VERSION: 3.11 | |
| jobs: | |
| amd64_build: | |
| runs-on: ubuntu-22.04 | |
| name: AMD64 Build | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up QEMU and Buildx | |
| id: setup | |
| uses: ./.github/actions/setup | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push amd64 standard build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: docker/main/Dockerfile | |
| push: true | |
| platforms: linux/amd64 | |
| target: frigate | |
| tags: ${{ steps.setup.outputs.image-name }}-amd64 | |
| cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64 | |
| cache-to: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max | |
| rocm_build: | |
| runs-on: ubuntu-22.04 | |
| name: ROCm Build | |
| needs: | |
| - amd64_build | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up QEMU and Buildx | |
| id: setup | |
| uses: ./.github/actions/setup | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: AMD/ROCm build | |
| env: | |
| HSA_OVERRIDE: 0 | |
| uses: docker/bake-action@v7 | |
| with: | |
| source: . | |
| push: true | |
| targets: rocm | |
| files: docker/rocm/rocm.hcl | |
| set: | | |
| rocm.tags=${{ steps.setup.outputs.image-name }}-rocm | |
| *.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm,mode=max | |
| *.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-rocm | |
| assemble_default_build: | |
| runs-on: ubuntu-22.04 | |
| name: Assemble and push default build | |
| needs: | |
| - amd64_build | |
| steps: | |
| - id: lowercaseRepo | |
| uses: ASzc/change-string-case-action@v6 | |
| with: | |
| string: ${{ github.repository }} | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create short sha | |
| run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| - name: Tag amd64 as default | |
| run: | | |
| docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest \ | |
| copy --authfile /config.json --multi-arch all \ | |
| docker://ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64 \ | |
| docker://ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }} |