Files
RPM/.gitea/workflows/build_rhel9.yaml
T
ebner b04c13caff
Build and Publish RPM / build-and-publish (push) Successful in 2m19s
hacking
2025-10-27 14:14:05 +01:00

59 lines
1.6 KiB
YAML

name: Build and Publish RPM
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-publish:
runs-on: "ubuntu-latest-intranet"
container:
image: gitea.psi.ch/images/rhel9-developer-gitea-actions
steps:
# - name: Checkout code
# uses: actions/checkout@v4
- name: Checkout LFS objects
run: git clone https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git .
- name: Copy all sources ...
run: |
find SOURCES
mkdir -p /data/SOURCES
cp SOURCES/* /data/SOURCES
- name: Build Pmodules RPM
run: |
spectool -g -R Pmodules.spec
rpmbuild -ba Pmodules.spec
- name: Build Pmodules_modules RPM
run: |
# spectool -g -R Pmodules_modules.spec
# we use the manually downloaded tar files
dnf -y builddep Pmodules_modules.spec
rpmbuild -ba Pmodules_modules.spec
- name: Build Pmodules_bash RPM
run: |
# spectool -g -R Pmodules_bash.spec
# we use the manually downloaded tar files
dnf -y builddep Pmodules_bash.spec
rpmbuild -ba Pmodules_bash.spec
- name: Check
run: |
# list generated rpms
find /data/RPMS
- name: Upload RPM packages
run: |
find /data/RPMS -type f -name '*.rpm' -exec curl -X PUT \
--user "pmodules-gitea:${{ secrets.PACKAGE_DEPLOY_TOKEN }}" \
--upload-file {} \
"${{ github.server_url }}/api/packages/${{ github.repository_owner }}/rpm/upload" \;