From 4d585d46fccc9e339727a064558a5f4e102afaab Mon Sep 17 00:00:00 2001 From: Eriq Taing Date: Thu, 27 Nov 2025 14:16:20 -0500 Subject: [PATCH] Opt to use docker and dockerfiles to build instead --- Dockerfile | 9 +++++++++ action.yml | 32 ++++---------------------------- entrypoint.sh | 4 ++++ 3 files changed, 17 insertions(+), 28 deletions(-) create mode 100644 Dockerfile create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c289cb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM fedora:latest + +COPY ./entrypoint.sh /entrypoint.sh + +RUN dnf -y rpmdevtools + +RUN rpmdev-setuptree + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/action.yml b/action.yml index e6f105d..3475acb 100644 --- a/action.yml +++ b/action.yml @@ -6,31 +6,7 @@ inputs: 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 + using: "docker" + image: "Dockerfile" + args: + - ${{ input.spec-file-path }} diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..8e18f3b --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh -l + +toolbox run rpmdev-spectool -g -C ~/rpmbuild/SOURCES $1 +rpmbuild --nodebuginfo --bb $1