-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 2.36 KB
/
build.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build images
on:
workflow_dispatch: # manual trigger
schedule:
# 4AM every monday, matches upstream weekly builds on sunday
- cron: "0 4 * * MON"
push:
branches: ["main"]
permissions:
contents: read
packages: write
jobs:
base-images:
runs-on: ubuntu-24.04
strategy:
matrix:
tag:
- arch
- fedora
- ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install newer Buildah
run: ./install-buildah-from-sid.sh
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ github.repository }}
tags: ${{ matrix.tag }}
context: ${{ matrix.tag }}
containerfiles: ./${{ matrix.tag }}/Containerfile
- name: Push To GHCR
uses: redhat-actions/push-to-registry@main
id: push-ghcr
with:
registry: ghcr.io
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
username: ${{ github.actor }}
password: ${{ github.token }}
# try to extra-compress layers since these are big images
extra-args: |
--compression-format=zstd
--compression-level=20
deriv-images:
runs-on: ubuntu-24.04
needs: base-images
strategy:
matrix:
tag:
- zed
- vr
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install newer Buildah
run: ./install-buildah-from-sid.sh
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@main
with:
image: ${{ github.repository }}
tags: ${{ matrix.tag }}
context: ${{ matrix.tag }}
containerfiles: ./${{ matrix.tag }}/Containerfile
- name: Push To GHCR
uses: redhat-actions/push-to-registry@main
id: push-ghcr
with:
registry: ghcr.io
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
username: ${{ github.actor }}
password: ${{ github.token }}
# try to extra-compress layers since these are big images
extra-args: |
--compression-format=zstd
--compression-level=20