forked from rancher-sandbox/rancher-desktop-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 2.03 KB
/
build.yaml
File metadata and controls
67 lines (59 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- type: tar.xz
arch: amd64
runs-on: ubuntu-latest
- type: qcow2
arch: amd64
runs-on: ubuntu-latest
- type: qcow2
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up QEMU for arm64 builds
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
with:
driver-opts: network=host
buildkitd-flags: "--allow-insecure-entitlement security.insecure"
platforms: linux/${{ matrix.arch }}
- name: Set up Docker layer cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
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: List build outputs
run: ls -lh
- name: Upload artifacts
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: distro-${{ matrix.type }}-${{ matrix.arch }}
path: |
distro.qcow2
distro.tar.xz