Skip to content

release v4.6 compatible #6

release v4.6 compatible

release v4.6 compatible #6

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