-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (73 loc) · 2.31 KB
/
ci.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
name: CI
on:
pull_request:
workflow_dispatch:
schedule:
# at 8:00 every 1st of the month
- cron: 0 8 1 * *
jobs:
test:
name: "📦 Build & install"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- "registry.fedoraproject.org/fedora:latest"
- "registry.fedoraproject.org/fedora:rawhide"
- "quay.io/centos/centos:stream8"
- "quay.io/centos/centos:stream9"
container:
image: ${{ matrix.container }}
steps:
- name: Base setup
run: |
dnf --setopt install_weak_deps=False install -y \
dnf-plugins-core \
git-core \
rpm-build \
sudo
dnf remove -y subscription-manager-rhsm-certificates
git config --global user.email "[email protected]"
git config --global user.name "Github Actions"
- name: Get container name & version
id: container-name
run: |
name=${{ matrix.container }}
name=${name##*/}
name=${name//:/-}
echo "name=${name}" >> $GITHUB_OUTPUT
- name: Setup EPEL 8
if: ${{ endsWith(matrix.container, 'stream8') }}
run: |
dnf config-manager --set-enabled powertools
dnf install -y epel-release epel-next-release
- name: Setup EPEL 9
if: ${{ endsWith(matrix.container, 'stream9') }}
run: |
dnf config-manager --set-enabled crb
dnf install -y epel-release epel-next-release
- name: Install tito
run: |
dnf --setopt install_weak_deps=False install -y \
tito
- uses: actions/checkout@v4
# This step is required so Tito can properly read git history
# See https://github.com/actions/checkout/issues/766
- name: Trust git repository path
run: |
git config --global --add safe.directory '*'
- name: Install RPM build dependencies
run: |
dnf --setopt install_weak_deps=False builddep -y \
--spec ./subscription-manager-rhsm-certificates.spec
- name: tito build --install
run: |
mkdir tito
tito build --offline --test --rpm --install --output=tito
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: RPMs for ${{ steps.container-name.outputs.name }}
path: |
tito/