Skip to content

BitCine/rpmbuild

 
 

Repository files navigation

typescript-action status typescript-action status

GitHub Action - Build RPM Package

This GitHub Action builds RPM files by using a specfile and an archive artifact, usually created during a preceeding build step. Outputs allow RPM files to be uploaded as an Artifact (actions/upload-artifact) or as a 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.

Inputs

  • spec_file: Path to the spec file. [required]
  • src_archive: Path to the source archive file (.tar.gz, .tgz). [required]

Outputs

  • rpm_path: Path to RPM file found in the rpmbuild/RPMS folder
  • rpm_name: Name of RPM file taken from the path
  • rpm_content_type: Content type for usage with actions/upload-release-asset

Example workflow - build RPM

based on ./example

name: RPM Build
on: push

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - run: npm install

    - run: make build bundle zip

    - name: Build RPM
      id: rpm_build
      uses: loganbickmore/[email protected]
      with:
        spec_file: 'hello-typescript.spec'
        src_archive: 'artifacts/hello-typescript.tar.gz'

    - name: Upload artifact
      uses: actions/[email protected]
      with:
        name: Binary RPM Artifact
        path: ${{ steps.rpm_build.outputs.rpm_path }}

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.7%
  • TypeScript 22.1%
  • Dockerfile 13.8%
  • Makefile 4.8%
  • Shell 3.6%