mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
f0dda499f8
* fixup! Split independent builds into parallel jobs * Combine caches within steps of same job * Remove Maintain Cache workflow Now that we're caching to ghcr instead of gha, we don't have to worry about gha's cache eviction after 7 days/10 GB.
40 lines
1.2 KiB
YAML
40 lines
1.2 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: Remove unnecessary files
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /usr/local/lib/android
|
|
sudo rm -rf /opt/ghc
|
|
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
|