summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yaml
blob: 04610089f767250d1fd549be4475161173a24aa1 (plain)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build images

on:
  push:
    branches: [main]
  schedule:
    - cron: "0 0 * * *"
  pull_request:
  workflow_dispatch:

env:
  REGISTRY: ghcr.io

jobs:
  akmods:
    name: Akmods Image

    permissions:
      contents: read
      id-token: write
      packages: write

    uses: ./.github/workflows/build-image.yaml
    with:
      image_name: akmods
      containerfile: ./akmods/Containerfile
      context: ./akmods
      extra_tags: |
        39-535
      build_args: |
        FEDORA_VERSION=39
        NVIDIA_VERSION=535
    secrets:
      akmods_key: ${{ secrets.AKMODS_KEY }}

  base:
    name: Base Images
    needs: [config]

    permissions:
      contents: read
      id-token: write
      packages: write

    strategy:
      fail-fast: false
      matrix:
        include:
          - image_name: getchblue
            fedora_version: 39
            image_flavor: silverblue

    uses: ./.github/workflows/build-image.yaml
    with:
      image_name: ${{ matrix.image_name }}
      containerfile: ./Containerfile
      context: .
      extra_tags: |
        ${{ matrix.fedora_version }}
      build_args: |
        FEDORA_VERSION=${{ matrix.fedora_version }}
        IMAGE_FLAVOR=${{ matrix.image_flavor }}

  config:
    name: Config layer

    permissions:
      contents: read
      id-token: write
      packages: write

    strategy:
      fail-fast: false
      matrix:
        fedora_version: [39]

    uses: ./.github/workflows/build-image.yaml
    with:
      image_name: config
      containerfile: ./config/Containerfile
      context: ./config
      extra_tags: |
        ${{ matrix.fedora_version }}
      build_args: |
        FEDORA_VERSION=${{ matrix.fedora_version }}

  nvidia:
    name: NVIDIA Images
    needs: [akmods, base]

    permissions:
      contents: read
      id-token: write
      packages: write

    strategy:
      fail-fast: false
      matrix:
        include:
          - image_flavor: getchblue 
            fedora_version: 39
            nvidia_version: 535

    uses: ./.github/workflows/build-image.yaml
    with:
      image_name: ${{ matrix.image_flavor }}-nvidia
      containerfile: ./nvidia/Containerfile
      context: ./nvidia
      extra_tags: |
        ${{ matrix.fedora_version }}-${{ matrix.nvidia_version }}
      build_args: |
        FEDORA_VERSION=${{ matrix.fedora_version }}
        IMAGE_FLAVOR=${{ matrix.image_flavor }}
        NVIDIA_VERSION=${{ matrix.nvidia_version }}