Compare commits

..

2 Commits

4 changed files with 32 additions and 16 deletions

View File

@@ -1,9 +0,0 @@
FROM fedora:latest
COPY ./entrypoint.sh /entrypoint.sh
RUN dnf -y install rpmdevtools
RUN rpmdev-setuptree
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -2,4 +2,4 @@
A gitea action to build rpm with a given spec file.
Requires toolbox and its dependencies.
Make sure that podman is installed

View File

@@ -6,7 +6,25 @@ inputs:
required: true
runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.spec-file-path }}
using: "composite"
steps:
- name: Setup workspace
shell: bash
env:
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
run: |
mkdir -p ./rpmbuild/{RPMS,SPECS}
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
- name: Build RPM
shell: bash
env:
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
run: |
SPEC_FILE_NAME=$(basename ${SPEC_FILE_PATH})
podman run --rm \
-v ./rpmbuild:/root/rpmbuild:rw,z \
-v ./entrypoint.sh:/root/entrypoint.sh:ro,z \
-w /root \
fedora:latest \
/root/entrypoint.sh /root/rpmbuild/SPECS/${SPEC_FILE_NAME}

View File

@@ -1,4 +1,11 @@
#!/bin/sh -l
#!/usr/bin/env bash
toolbox run rpmdev-spectool -g -C ~/rpmbuild/SOURCES $1
dnf -y config-manager --add-repo https://git.hydrosaber.com/api/packages/hydros/rpm/f43.repo
dnf -y install rpmdevtools
rpmdev-setuptree
dnf -y builddep $1
rpmdev-spectool -g -C ~/rpmbuild/SOURCES $1
rpmbuild --nodebuginfo --bb $1