Compare commits

..

3 Commits

3 changed files with 31 additions and 4 deletions

View File

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

View File

@@ -1,9 +1,21 @@
name: Build RPM
description: "Builds rpm for given spec file"
name: Build and Upload RPM
description: "Builds rpm for given spec file and uploads to hydrosaber gitea repository."
inputs:
spec-file-path:
description: "Path to spec file for rpm"
required: true
package-group:
description: "Group repository to upload package to"
default: "43"
repository-url:
description: "Gitea repository to upload package to"
default: "https://git.hydrosaber.com"
repository-user:
description: "User in repository to upload as"
required: true
repository-user-token:
description: "Token to use with user"
required: true
runs:
using: "composite"
@@ -29,3 +41,18 @@ runs:
-w /root \
fedora:latest \
/root/entrypoint.sh /root/rpmbuild/SPECS/${SPEC_FILE_NAME}
- name: Upload package
shell: bash
env:
REPOSITORY_URL: ${{ inputs.repository-url }}
PACKAGE_GROUP: ${{ inputs.package-group }}
GITEA_ACTOR: ${{ gitea.actor }}
UPLOAD_USER: ${{ inputs.repository-user }}
UPLOAD_USER_TOKEN: ${{ inputs.repository-user-token }}
run: |
find ./rpmbuild/RPMS/ -name "*.rpm" -type f \
-exec curl \
--user ${UPLOAD_USER}:${UPLOAD_USER_TOKEN} \
--upload-file {} \
${REPOSITORY_URL}/api/packages/${GITEA_ACTOR}/rpm/${PACKAGE_GROUP}/upload \;

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
dnf -y config-manager --add-repo https://git.hydrosaber.com/api/packages/hydros/rpm/f43.repo
dnf -y config-manager addrepo --from-repofile=https://git.hydrosaber.com/api/packages/hydros/rpm/f43.repo
dnf -y install rpmdevtools
rpmdev-setuptree