2023-07-27 14:56:12 +02:00
|
|
|
name: 'Setup'
|
|
|
|
description: 'Set up QEMU and Buildx'
|
|
|
|
inputs:
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
required: true
|
|
|
|
outputs:
|
|
|
|
image-name:
|
2023-07-27 18:41:41 +02:00
|
|
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
2023-07-27 14:56:12 +02:00
|
|
|
cache-name:
|
|
|
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
2024-02-15 01:16:53 +01:00
|
|
|
# Stop docker so we can mount more space at /var/lib/docker
|
|
|
|
- name: Stop docker
|
|
|
|
run: sudo systemctl stop docker
|
|
|
|
shell: bash
|
|
|
|
# This creates a virtual volume at /var/lib/docker to maximize the size
|
|
|
|
# As of 2/14/2024, this results in 97G for docker images
|
|
|
|
- name: Maximize build space
|
|
|
|
uses: easimon/maximize-build-space@master
|
|
|
|
with:
|
|
|
|
remove-dotnet: 'true'
|
|
|
|
remove-android: 'true'
|
|
|
|
remove-haskell: 'true'
|
|
|
|
remove-codeql: 'true'
|
|
|
|
build-mount-path: '/var/lib/docker'
|
|
|
|
- name: Start docker
|
|
|
|
run: sudo systemctl start docker
|
2023-07-27 14:56:12 +02:00
|
|
|
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
|
2023-07-27 18:41:41 +02:00
|
|
|
- id: create-short-sha
|
|
|
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
|
2023-07-27 14:56:12 +02:00
|
|
|
shell: bash
|