Skip to content

Merge pull request #15 from mook-as/pin-downloads #103

Merge pull request #15 from mook-as/pin-downloads

Merge pull request #15 from mook-as/pin-downloads #103

Workflow file for this run

name: Build
on:
push:
branches: [ '**' ]
tags-ignore: [ 'v*', 'test-v*' ]
pull_request:
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- type: tar.xz
arch: amd64
runs-on: ubuntu-latest
- type: tar.xz
arch: arm64
runs-on: ubuntu-24.04-arm
- type: raw.xz
arch: amd64
runs-on: ubuntu-latest
- type: raw.xz
arch: arm64
runs-on: ubuntu-24.04-arm
- type: qcow2.xz
arch: amd64
runs-on: ubuntu-latest
- type: qcow2.xz
arch: arm64
runs-on: ubuntu-24.04-arm
env:
GO: /bin/false # Never used, but disable auto-detection in the Makefile.
GOOS: linux
GOARCH: ${{ matrix.arch }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
with:
driver-opts: network=host
buildkitd-flags: "--allow-insecure-entitlement security.insecure"
platforms: linux/${{ matrix.arch }}
- name: Restore Docker layer cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ runner.temp }}/cache
key: ${{ runner.arch }}-buildx-${{ matrix.type }}-${{ github.sha }}
restore-keys: |
${{ runner.arch }}-buildx-${{ matrix.type }}-
${{ runner.arch }}-buildx-
- name: Install wget
run: sudo apt-get update && sudo apt-get install -y wget
- name: Build image
run: |
echo "Building distro.${{ matrix.type }} for ${{ matrix.arch }}"
make GOARCH=${{ matrix.arch }} distro.${{ matrix.type }}
- name: Upload artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: distro-${{ matrix.type }}-${{ matrix.arch }}
path: distro.${{ matrix.type }}
- name: Save Docker layer cache
if: github.ref == 'refs/heads/main'
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ runner.temp }}/cache
key: ${{ runner.arch }}-buildx-${{ matrix.type }}-${{ github.sha }}