|
| 1 | +name: Build EL10 RPMs |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + release_name: |
| 9 | + description: 'Release name/tag (e.g., v1.9.0)' |
| 10 | + required: true |
| 11 | + type: string |
| 12 | + draft_release: |
| 13 | + description: 'Create as draft release' |
| 14 | + required: false |
| 15 | + type: boolean |
| 16 | + default: true |
| 17 | + |
| 18 | +defaults: |
| 19 | + run: |
| 20 | + shell: bash -eux {0} |
| 21 | + |
| 22 | +concurrency: |
| 23 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 24 | + cancel-in-progress: true |
| 25 | + |
| 26 | +jobs: |
| 27 | + build_rocky10_rpms: |
| 28 | + name: Build Rockylinux 10 RPMs |
| 29 | + runs-on: ubuntu-latest |
| 30 | + container: |
| 31 | + image: rockylinux/rockylinux:10 |
| 32 | + #workaround, rocky10 by default not initializing PATH |
| 33 | + env: |
| 34 | + PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| 35 | + |
| 36 | + steps: |
| 37 | + - name: Checkout code |
| 38 | + uses: actions/checkout@v4 |
| 39 | + with: |
| 40 | + ref: ${{ github.event.inputs.release_name }} |
| 41 | + |
| 42 | + - name: Install dependencies |
| 43 | + run: | |
| 44 | + dnf install -y epel-release rpm-build rpmdevtools python3-devel python3-setuptools |
| 45 | +
|
| 46 | + - name: Build RPMs for el10 |
| 47 | + run: | |
| 48 | + ./mkrpm.sh el10 |
| 49 | +
|
| 50 | + - name: Locate generated RPMs |
| 51 | + run: | |
| 52 | + echo "=== Source RPM ===" |
| 53 | + find ~/rpmbuild/SRPMS -name "*.src.rpm" -type f |
| 54 | + echo "=== Binary RPMs ===" |
| 55 | + find ~/rpmbuild/RPMS -name "*.rpm" -type f |
| 56 | +
|
| 57 | + - name: Upload artifacts (SRPM and RPM) |
| 58 | + uses: actions/upload-artifact@v4 |
| 59 | + with: |
| 60 | + name: el10-rpms |
| 61 | + path: | |
| 62 | + ~/rpmbuild/SRPMS/*.src.rpm |
| 63 | + ~/rpmbuild/RPMS/*/*.rpm |
| 64 | + retention-days: 30 |
| 65 | + |
| 66 | + - name: Create Release with RPMs only |
| 67 | + uses: softprops/action-gh-release@v1 |
| 68 | + with: |
| 69 | + tag_name: ${{ github.event.inputs.release_name }} |
| 70 | + draft: ${{ github.event.inputs.draft_release }} |
| 71 | + files: | |
| 72 | + ~/rpmbuild/RPMS/*/*.rpm |
| 73 | + env: |
| 74 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments