forked from documentdb/documentdb
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (55 loc) · 1.84 KB
/
build_rpm_packages.yml
File metadata and controls
62 lines (55 loc) · 1.84 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
name: Build RPM packages
concurrency:
group: build-rpm-packages-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- '.devcontainer/**'
- '*.md'
pull_request:
types: [opened, reopened, synchronize]
paths-ignore:
- 'docs/**'
- '.devcontainer/**'
- '*.md'
jobs:
build-rpm-packages:
runs-on: ${{ matrix.runner }}
name: RPM packages for ${{ matrix.os }}-${{ matrix.arch }}-pg${{ matrix.pg_version }}
strategy:
fail-fast: false
matrix:
os: [rhel8, rhel9]
arch: [amd64]
include:
- arch: amd64
runner: ubuntu-24.04
ivory_version:
- 4
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract and Format Default Version
id: extract_version
run: |
DOCUMENTDB_VERSION=$(grep -E "^default_version" pg_documentdb_core/documentdb_core.control | sed -E "s/.*'([0-9]+\.[0-9]+-[0-9]+)'.*/\1/")
DOCUMENTDB_VERSION=$(echo $DOCUMENTDB_VERSION | sed "s/-/./g")
echo "Extracted Version: $DOCUMENTDB_VERSION"
echo "DOCUMENTDB_VERSION=$DOCUMENTDB_VERSION" >> $GITHUB_ENV
- name: Build RPM Package
run: |
./packaging/build_packages.sh --os ${{ matrix.os }} --ivy ${{ matrix.ivory_version }} --version ${{ env.DOCUMENTDB_VERSION }} --test-clean-install
- name: Upload RPM Package as Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.arch }}-pg${{ matrix.ivory_version }}-documentdb-${{ env.DOCUMENTDB_VERSION }}
path: |
packaging/*.rpm
retention-days: 7
if-no-files-found: error
compression-level: 0