-
Notifications
You must be signed in to change notification settings - Fork 169
156 lines (135 loc) · 3.82 KB
/
Copy pathbuild-rpm.yml
File metadata and controls
156 lines (135 loc) · 3.82 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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Run Build Tasks and Release
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-arm64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
matrix:
include:
- tag: aarch64_el8
platform: linux/arm64
- tag: aarch64_el9
platform: linux/arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run pullsrc.sh
run: env ALL=1 ./pullsrc.sh
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run ${{ matrix.tag }}
run: |
docker run --rm \
-v $(pwd):/data \
--platform ${{ matrix.platform }} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpm-${{ matrix.tag }}
path: output/*.rpm
if-no-files-found: ignore
build-amd64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
matrix:
include:
- tag: el9
- tag: el8
- tag: el7
- tag: el6
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run pullsrc.sh
run: env ALL=1 ./pullsrc.sh
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run ${{ matrix.tag }}
run: |
docker run --rm \
-v $(pwd):/data \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.tag }}
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpm-${{ matrix.tag }}
path: output/*.rpm
if-no-files-found: ignore
build-el5:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
matrix:
include:
- m32: "0"
- m32: "1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run pullsrc.sh
run: env ALL=1 ./pullsrc.sh
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run el5 with M32=${{ matrix.m32 }}
run: |
docker run --rm \
-v $(pwd):/data \
-e "M32=${{ matrix.m32 }}" \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:el5
- name: Upload RPM artifacts
uses: actions/upload-artifact@v4
with:
name: rpm-el5-m32-${{ matrix.m32 }}
path: output/*.rpm
if-no-files-found: ignore
release:
needs: [build-arm64, build-amd64, build-el5]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: List artifacts
run: |
echo "Downloaded artifacts:"
find artifacts -type f -name "*.rpm" || echo "No RPM files found"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*.rpm
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}