forked from rancher-sandbox/rancher-desktop-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.78 KB
/
build.yaml
File metadata and controls
61 lines (52 loc) · 1.78 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
name: Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
type: [tar.xz, qcow2]
arch: [amd64, arm64]
exclude:
- type: tar.xz
arch: arm64
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
# TODO: this should not be hardcoded
go-version: "1.24.2"
- 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
platforms: linux/${{ matrix.arch }}
- name: Set up Docker layer cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-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