Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
package

GitHub Action

RPM Build

v0.0.1

RPM Build

package

RPM Build

Build RPMs from spec file and upload it as Artifact or Release Asset

Installation

Copy and paste the following snippet into your .yml file.

              

- name: RPM Build

uses: naveenrajm7/[email protected]

Learn more about this action in naveenrajm7/rpmbuild

Choose a version

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.

  1. Upload as build artifact You can use GitHub Action @actions/upload-artifact
  2. 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 directory
  • source_rpm_path: path to Source RPM file
  • source_rpm_dir_path: path to SRPMS directory
  • source_rpm_name: name of Source RPM file
  • rpm_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/[email protected]
      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