From 2c3371f5d077011e84e4877ce95f4b5b4bd85570 Mon Sep 17 00:00:00 2001 From: Weitheng Haw Date: Fri, 20 Dec 2024 07:32:39 +0000 Subject: [PATCH] Change workflow file to build and push images in pr --- .github/workflows/ci.yml | 64 +++++++--------------------------------- 1 file changed, 10 insertions(+), 54 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e360b5ff..d554e24dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: branches: - dev - master + pull_request: + branches: + - dev + - master # only run the latest commit to avoid cache overwrites concurrency: @@ -37,6 +41,7 @@ jobs: target: frigate tags: ${{ steps.setup.outputs.image-name }}-amd64 cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64 + arm64_build: runs-on: ubuntu-latest name: ARM Build @@ -78,6 +83,7 @@ jobs: set: | rk.tags=${{ steps.setup.outputs.image-name }}-rk *.cache-from=type=gha + jetson_jp4_build: runs-on: ubuntu-latest name: Jetson Jetpack 4 @@ -104,6 +110,7 @@ jobs: tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp4 *.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp4 *.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp4,mode=max + jetson_jp5_build: runs-on: ubuntu-latest name: Jetson Jetpack 5 @@ -130,6 +137,7 @@ jobs: tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp5 *.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp5 *.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp5,mode=max + amd64_extra_builds: runs-on: ubuntu-latest name: AMD64 Extra Build @@ -155,59 +163,7 @@ jobs: tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt *.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64 *.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max - #- name: AMD/ROCm general build - # env: - # AMDGPU: gfx - # HSA_OVERRIDE: 0 - # uses: docker/bake-action@v3 - # with: - # push: true - # targets: rocm - # files: docker/rocm/rocm.hcl - # set: | - # rocm.tags=${{ steps.setup.outputs.image-name }}-rocm - # *.cache-from=type=gha - #- name: AMD/ROCm gfx900 - # env: - # AMDGPU: gfx900 - # HSA_OVERRIDE: 1 - # HSA_OVERRIDE_GFX_VERSION: 9.0.0 - # uses: docker/bake-action@v3 - # with: - # push: true - # targets: rocm - # files: docker/rocm/rocm.hcl - # set: | - # rocm.tags=${{ steps.setup.outputs.image-name }}-rocm-gfx900 - # *.cache-from=type=gha - #- name: AMD/ROCm gfx1030 - # env: - # AMDGPU: gfx1030 - # HSA_OVERRIDE: 1 - # HSA_OVERRIDE_GFX_VERSION: 10.3.0 - # uses: docker/bake-action@v3 - # with: - # push: true - # targets: rocm - # files: docker/rocm/rocm.hcl - # set: | - # rocm.tags=${{ steps.setup.outputs.image-name }}-rocm-gfx1030 - # *.cache-from=type=gha - #- name: AMD/ROCm gfx1100 - # env: - # AMDGPU: gfx1100 - # HSA_OVERRIDE: 1 - # HSA_OVERRIDE_GFX_VERSION: 11.0.0 - # uses: docker/bake-action@v3 - # with: - # push: true - # targets: rocm - # files: docker/rocm/rocm.hcl - # set: | - # rocm.tags=${{ steps.setup.outputs.image-name }}-rocm-gfx1100 - # *.cache-from=type=gha - # The majority of users running arm64 are rpi users, so the rpi - # build should be the primary arm64 image + assemble_default_build: runs-on: ubuntu-latest name: Assemble and push default build @@ -232,4 +188,4 @@ jobs: tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }} sources: | ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64 - ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi + ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi \ No newline at end of file