mirror of
https://github.com/naveenrajm7/rpmbuild.git
synced 2025-07-11 20:04:42 +00:00
9ee1f018db752cca32efee0e4ae1c8b22eae906e
GitHub Action - RPM Build
This GitHub Action builds RPMs from spec file and using repository contents as source (wraps the rpmbuild utility). Integrates easily with GitHub actions to allow RPMS to be uploaded as Artifact (actions/upload-artifact) or as Release Asset (actions/upload-release-asset).
Usage
Pre-requisites
Create a workflow .yml
file in your repositories .github/workflows
directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.
This generated RPMS and SRPMS can be used in two ways.
- Upload as build artifact
You can use GitHub Action
@actions/upload-artifact
- Upload as Release assest
If you want to upload as release asset ,You also will need to have a release to upload your asset to, which could be created programmatically by
@actions/create-release
as show in the example workflow.
Inputs
spec_file
: The path to the spec file in your repo.**require**
Outputs
rpm_dir_path
: path to RPMS directorysource_rpm_path
: path to Source RPM filesource_rpm_dir_path
: path to SRPMS directorysource_rpm_name
: name of Source RPM filerpm_content_type
: Content-type for RPM Upload
Example workflow - build RPM
Basic:
name: RPM Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: build RPM package
id: rpm
uses: naveenrajm7/rpmbuild@master
with:
spec_file: "cello.spec"
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
name: Source RPM
path: ${{ steps.rpm.outputs.source_rpm_path }}
License
The scripts and documentation in this project are released under the GNU GPLv3
Languages
TypeScript
84.7%
Dockerfile
11.1%
JavaScript
4.2%