From bbd3ec006910224af0b08d11b127aa3bc3b3ebd1 Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Thu, 20 Nov 2025 14:45:15 -0500 Subject: [PATCH] Created action and added some information to README.md --- README.md | 3 +++ action.yml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 action.yml diff --git a/README.md b/README.md index 7d3d1de..e486f81 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # build-rpm +A gitea action to build rpm with a given spec file. + +Requires toolbox and its dependencies. diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..e6f105d --- /dev/null +++ b/action.yml @@ -0,0 +1,36 @@ +name: Build RPM +description: "Builds rpm for given spec file" +inputs: + spec-file-path: + description: "Path to spec file for rpm" + required: true + +runs: + using: "composite" + steps: + - name: Setup toolbox environment + shell: bash + run: | + toolbox run sudo dnf -y rpmdevtools + toolbox run rpmdev-setuptree + + - name: Install Dependencies + env: + SPEC_FILE_PATH: ${{ inputs.spec-file-path }} + shell: bash + run: | + toolbox run sudo dnf -y builddep $SPEC_FILE_PATH + + - name: Download Source + env: + SPEC_FILE_PATH: ${{ inputs.spec-file-path }} + shell: bash + run: | + toolbox run rpmdev-spectool -g -C ~/rpmbuild/SOURCES $SPEC_FILE_PATH + + - name: Build packages + env: + SPEC_FILE_PATH: ${{ inputs.spec-file-path }} + shell: bash + run: | + toolbox run rpmbuild --nodebuginfo --bb $SPEC_FILE_PATH