mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
add release workflow for images (#8362)
This commit is contained in:
parent
d72e1c38ae
commit
cd64399fe5
62
.github/workflows/release.yml
vendored
Normal file
62
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
name: On release
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- id: lowercaseRepo
|
||||||
|
uses: ASzc/change-string-case-action@v5
|
||||||
|
with:
|
||||||
|
string: ${{ github.repository }}
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Create tag variables
|
||||||
|
run: |
|
||||||
|
echo "BASE=ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}" >> $GITHUB_ENV
|
||||||
|
echo "BUILD_TAG=${{ github.ref_name }}-${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||||
|
echo "CLEAN_VERSION=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/^[v]//')" >> $GITHUB_ENV
|
||||||
|
- name: Tag and push the main image
|
||||||
|
run: |
|
||||||
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}
|
||||||
|
PULL_TAG=${BASE}:${BUILD_TAG}
|
||||||
|
docker pull ${PULL_TAG}
|
||||||
|
docker tag ${PULL_TAG} ${VERSION_TAG}
|
||||||
|
docker push ${VERSION_TAG}
|
||||||
|
- name: Tag and push standard arm64
|
||||||
|
run: |
|
||||||
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}-standard-arm64
|
||||||
|
PULL_TAG=${BASE}:${BUILD_TAG}-standard-arm64
|
||||||
|
docker pull ${PULL_TAG}
|
||||||
|
docker tag ${PULL_TAG} ${VERSION_TAG}
|
||||||
|
docker push ${VERSION_TAG}
|
||||||
|
- name: Tag and push tensorrt
|
||||||
|
run: |
|
||||||
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}-tensorrt
|
||||||
|
PULL_TAG=${BASE}:${BUILD_TAG}-tensorrt
|
||||||
|
docker pull ${PULL_TAG}
|
||||||
|
docker tag ${PULL_TAG} ${VERSION_TAG}
|
||||||
|
docker push ${VERSION_TAG}
|
||||||
|
- name: Tag and push tensorrt-jp4
|
||||||
|
run: |
|
||||||
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}-tensorrt-jp4
|
||||||
|
PULL_TAG=${BASE}:${BUILD_TAG}-tensorrt-jp4
|
||||||
|
docker pull ${PULL_TAG}
|
||||||
|
docker tag ${PULL_TAG} ${VERSION_TAG}
|
||||||
|
docker push ${VERSION_TAG}
|
||||||
|
- name: Tag and push tensorrt-jp5
|
||||||
|
run: |
|
||||||
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}-tensorrt-jp5
|
||||||
|
PULL_TAG=${BASE}:${BUILD_TAG}-tensorrt-jp5
|
||||||
|
docker pull ${PULL_TAG}
|
||||||
|
docker tag ${PULL_TAG} ${VERSION_TAG}
|
||||||
|
docker push ${VERSION_TAG}
|
Loading…
Reference in New Issue
Block a user