forked from lest/prometheus-rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (118 loc) · 3.78 KB
/
Copy pathprometheus2_rpm.yml
File metadata and controls
141 lines (118 loc) · 3.78 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
name: Build EL10 RPMs
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
inputs:
release_name:
description: 'Release name (e.g. v0.4.10)'
required: true
default: ''
draft:
description: 'Create as draft release'
type: boolean
default: true
jobs:
build-prometheus2-rpm:
name: Build Prometheus2 RPM for EL10
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get install -y make
- name: Build Rocky10 Docker Image
run: make build-rocky10-image
- name: Build Prometheus2 RPM
run: make build10-prometheus2
- name: Upload Binary RPM
uses: actions/upload-artifact@v4
with:
name: prometheus2-el10-rpm
path: _dist10_RPM/*.rpm
if-no-files-found: error
- name: Upload Source RPM
uses: actions/upload-artifact@v4
with:
name: prometheus2-el10-srpm
path: _dist10_SRPM/*.rpm
if-no-files-found: error
- name: Create GitHub Release
if: github.event_name == 'workflow_dispatch' && inputs.release_name != ''
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.release_name }}
name: ${{ inputs.release_name }}
draft: ${{ inputs.draft }}
files: _dist10_RPM/*.rpm
build-systemd_exporter-rpm:
name: Build Systemd Exporter RPM for EL10
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get install -y make
- name: Build Rocky10 Docker Image
run: make build-rocky10-image
- name: Build Systemd Exporter RPM
run: make build10-systemd_exporter
- name: Upload Binary RPM
uses: actions/upload-artifact@v4
with:
name: systemd_exporter-el10-rpm
path: _dist10_RPM/*.rpm
if-no-files-found: error
- name: Upload Source RPM
uses: actions/upload-artifact@v4
with:
name: systemd_exporter-el10-srpm
path: _dist10_SRPM/*.rpm
if-no-files-found: error
- name: Create GitHub Release
if: github.event_name == 'workflow_dispatch' && inputs.release_name != ''
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.release_name }}
name: ${{ inputs.release_name }}
draft: ${{ inputs.draft }}
files: _dist10_RPM/*.rpm
build-node_exporter-rpm:
name: Build Node Exporter RPM for EL10
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get install -y make
- name: Build Rocky10 Docker Image
run: make build-rocky10-image
- name: Build Node Exporter RPM
run: make build10-node_exporter
- name: Upload Binary RPM
uses: actions/upload-artifact@v4
with:
name: node_exporter-el10-rpm
path: _dist10_RPM/*.rpm
if-no-files-found: error
- name: Upload Source RPM
uses: actions/upload-artifact@v4
with:
name: node_exporter-el10-srpm
path: _dist10_SRPM/*.rpm
if-no-files-found: error
- name: Create GitHub Release
if: github.event_name == 'workflow_dispatch' && inputs.release_name != ''
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.release_name }}
name: ${{ inputs.release_name }}
draft: ${{ inputs.draft }}
files: _dist10_RPM/*.rpm