use short sha

This commit is contained in:
Blake Blackshear 2022-11-23 19:49:54 -06:00
parent 4fe19a2fd3
commit a12b2f64c1

View File

@ -27,6 +27,8 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create short sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v3
with:
@ -34,6 +36,6 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/blakeblackshear/frigate:${{ github.ref_name }}-${{ github.sha }}
ghcr.io/blakeblackshear/frigate:${{ github.ref_name }}-${{ env.SHORT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max