-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (57 loc) · 1.82 KB
/
oci-builder.yaml
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
name: oci-builder
on:
push:
branches: [ main ]
tags:
- '*'
pull_request:
branches: [ main ]
jobs:
build-snc-runner-oci:
name: build-snc-runner-oci
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build image for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
SNC_RUNNER: ghcr.io/crc-org/ci-definitions
SNC_RUNNER_V: pr-${{ github.event.number }}
run: |
make build-snc-runner-oci
podman save -o snc-runner.tar ${SNC_RUNNER}:${SNC_RUNNER_V}
- name: Upload image for PR
uses: actions/upload-artifact@v4
with:
name: snc-runner
path: snc-runner.tar
build-crc-builder-oci:
name: build-crc-builder-oci
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Prepare runner
shell: bash
run: |
sudo apt-get install -y qemu-user-static
- name: Build images for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
CRC_BUILDER: ghcr.io/crc-org/ci-definitions
CRC_BUILDER_V: pr-${{ github.event.number }}
run: |
make build-crc-builder-oci
# crc-builder creates 3 images (1 per platform)
podman save -o crc-builder-linux.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-linux
podman save -o crc-builder-windows.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-windows
podman save -o crc-builder-darwin.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-darwin
- name: Upload image for PR
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: crc-builder
path: "*.tar"