Improvements of RPM build actions stability #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build RPMs and upload its to release draft | |
| on: | |
| push: | |
| tags: | |
| - 'V*' | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_rpms: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| RHEL_VERSION: ["8", "9", "10"] | |
| PG_VERSION: ["14", "15", "16", "17", "18"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: REL_${{ matrix.PG_VERSION }}_STABLE | |
| - name: Build PostgreSQL ${{ matrix.PG_VERSION }} RPMs for RHEL ${{ matrix.RHEL_VERSION }} | |
| run: | | |
| export PG_RMAN_VERSION=${GITHUB_REF_NAME#V} | |
| docker build .github/workflows/ -t pg_rman \ | |
| --build-arg RHEL_VERSION=${{ matrix.RHEL_VERSION }} \ | |
| --build-arg PG_VERSION=${{ matrix.PG_VERSION }} \ | |
| --build-arg PG_RMAN_VERSION=${PG_RMAN_VERSION} \ | |
| --build-arg REPO_URL=https://github.com/${{ github.repository }}.git | |
| container_id=$(docker create pg_rman) | |
| docker cp $container_id:/var/lib/pgsql/rpmbuild/RPMS/x86_64 ./RPMS | |
| - name: Create release draft and upload the RPMs | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Release draft | |
| draft: true | |
| files: ./RPMS/*.rpm |