Remove arm64 variants (rk, tensorrt-jp6, synaptics) from CI #38
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 and Push Docker Image | |
| on: | |
| push: | |
| branches: [master] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| inputs: | |
| frigate_version: | |
| description: "Frigate base version (e.g. 0.17.1)" | |
| required: false | |
| default: "0.17.1" | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| FRIGATE_BASE_VERSION: "0.17.1" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| strategy: | |
| matrix: | |
| variant: | |
| - suffix: "" | |
| tag_suffix: "" | |
| - suffix: "-tensorrt" | |
| tag_suffix: "-tensorrt" | |
| - suffix: "-rocm" | |
| tag_suffix: "-rocm" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set Frigate version | |
| env: | |
| INPUT_VERSION: ${{ inputs.frigate_version }} | |
| run: | | |
| BASE="${INPUT_VERSION:-$FRIGATE_BASE_VERSION}" | |
| echo "FRIGATE_VERSION=${BASE}${{ matrix.variant.suffix }}" >> "$GITHUB_ENV" | |
| echo "TAG_SUFFIX=${{ matrix.variant.tag_suffix }}" >> "$GITHUB_ENV" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=latest${{ env.TAG_SUFFIX }},enable=${{ github.ref == 'refs/heads/master' }} | |
| type=raw,value=frigate-${{ env.FRIGATE_VERSION }},enable=${{ github.ref == 'refs/heads/master' }} | |
| type=ref,event=pr,suffix=${{ env.TAG_SUFFIX }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| FRIGATE_VERSION=${{ env.FRIGATE_VERSION }} | |
| ABR_COMMIT=${{ github.sha }} | |
| ABR_VERSION=${{ github.ref_name }} | |
| cache-from: type=gha,scope=${{ env.FRIGATE_VERSION }} | |
| cache-to: type=gha,mode=max,scope=${{ env.FRIGATE_VERSION }} | |
| platforms: linux/amd64 | |
| check-frigate-release: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| permissions: | |
| contents: read | |
| issues: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Check for new Frigate release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CURRENT_VERSION: "0.17.1" | |
| run: | | |
| LATEST=$(gh api repos/blakeblackshear/frigate/releases/latest --jq .tag_name | sed 's/^v//') | |
| echo "Current pinned: $CURRENT_VERSION" | |
| echo "Latest Frigate: $LATEST" | |
| if [ "$LATEST" != "$CURRENT_VERSION" ]; then | |
| echo "::warning::New Frigate release available: $LATEST (currently pinned to $CURRENT_VERSION)" | |
| EXISTING=$(gh issue list --search "Update Frigate base to $LATEST" --json number --jq length) | |
| if [ "$EXISTING" = "0" ]; then | |
| gh issue create \ | |
| --title "Update Frigate base to $LATEST" \ | |
| --body "A new Frigate stable release **$LATEST** is available. Current pinned version is **$CURRENT_VERSION**. | |
| To update: | |
| 1. Change FRIGATE_BASE_VERSION in .github/workflows/build.yml | |
| 2. Test the build | |
| 3. Push to master | |
| Or trigger a manual build: Actions -> Build and Push -> Run workflow -> set version to $LATEST" | |
| fi | |
| fi |