You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
RPM Build
v0.0.1
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).
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.
spec_file
: The path to the spec file in your repo.**require**
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
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/[email protected]
with:
name: Source RPM
path: ${{ steps.rpm.outputs.source_rpm_path }}
The scripts and documentation in this project are released under the GNU GPLv3