mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
name: 'Setup'
|
|
description: 'Set up QEMU and Buildx'
|
|
inputs:
|
|
GITHUB_TOKEN:
|
|
required: true
|
|
outputs:
|
|
image-name:
|
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
|
cache-name:
|
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Show disk info
|
|
run: df -h
|
|
shell: bash
|
|
- name: Show docker image info
|
|
run: docker image ls --all
|
|
shell: bash
|
|
- name: Maximize build space
|
|
uses: easimon/maximize-build-space@master
|
|
with:
|
|
root-reserve-mb: 512
|
|
swap-size-mb: 1024
|
|
remove-dotnet: 'true'
|
|
remove-android: 'true'
|
|
remove-haskell: 'true'
|
|
remove-codeql: 'true'
|
|
remove-docker-images: 'true'
|
|
- name: Show disk info
|
|
run: df -h
|
|
shell: bash
|
|
- name: Show docker image info
|
|
run: docker image ls --all
|
|
shell: bash
|
|
- id: lowercaseRepo
|
|
uses: ASzc/change-string-case-action@v5
|
|
with:
|
|
string: ${{ github.repository }}
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ inputs.GITHUB_TOKEN }}
|
|
- name: Create version file
|
|
run: make version
|
|
shell: bash
|
|
- id: create-short-sha
|
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
|
|
shell: bash
|