Compare commits

...

19 Commits

Author SHA1 Message Date
c6628c58b5 Bring back the find exec call to upload packages 2025-12-03 23:32:00 -05:00
8af940127f Make the search for a package more arch agnostic 2025-12-03 18:58:59 -05:00
0cc905a79d Attempt to put patches in a temp directory and add after source is
downloaded
2025-12-03 15:09:48 -05:00
9e40736cb7 Add feature to allow adding files from a directory to sources in
rpmbuild
2025-12-03 14:43:26 -05:00
04353ee147 Remove priority changes 2025-12-02 14:33:27 -05:00
3197993322 Remove ending remaining from the find exec 2025-12-02 14:13:26 -05:00
468f09a7a1 Corrected default group to f43 instead of 43 2025-12-02 13:57:32 -05:00
1bbc46c940 Listing upload url into logs 2025-12-02 13:48:16 -05:00
d6ae96507b Used wrong toggle for checking if var is not empty 2025-12-02 13:32:54 -05:00
62e9b183cc Try to give more information for troubleshooting 2025-12-02 13:28:02 -05:00
cc025c1767 Changed to be more limited to only a package following the same name and
devel
2025-12-02 12:55:59 -05:00
5975c89780 Previous name was correct, setting 2025-12-02 00:33:00 -05:00
d03ee8b339 Attempt to find actual repo to set priority. Make done only appear when
build succeed.
2025-12-01 23:17:24 -05:00
f9a61a2d96 Attempt label in repo file for name 2025-12-01 18:32:05 -05:00
22d2f09bdf Use up to date argument formats for config-manager 2025-12-01 18:29:44 -05:00
ff054b53a0 no need to save priority 2025-12-01 18:18:01 -05:00
fe5f762047 Add print statements to tell when certain processes begin and end. Added
priority to hydros repo to install newer devel tools
2025-12-01 16:05:37 -05:00
7041c5f4ad Changed so action publishes to repository owner 2025-11-30 22:03:55 -05:00
9ab81474ec Merge building and uploading into one step 2025-11-30 21:54:43 -05:00
2 changed files with 36 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ inputs:
required: true
package-group:
description: "Group repository to upload package to"
default: "43"
default: "f43"
repository-url:
description: "Gitea repository to upload package to"
default: "https://git.hydrosaber.com"
@@ -16,6 +16,9 @@ inputs:
repository-user-token:
description: "Token to use with user"
required: true
extra-source-directory:
description: "(Optional) Directory to grab files for sources."
default: ""
runs:
using: "composite"
@@ -28,6 +31,16 @@ runs:
mkdir -p ./rpmbuild/{RPMS,SPECS}
cp ${SPEC_FILE_PATH} ./rpmbuild/SPECS
- name: Add extra source files
shell: bash
if: "${{ inputs.extra-source-directory != '' }}"
env:
SOURCE_DIRECTORY: ${{ inputs.extra-source-directory }}
run: |
mkdir -p ./rpmbuild/PATCHES
find ${SOURCE_DIRECTORY} -type f -not -name "*\.spec" \
-exec cp {} ./rpmbuild/PATCHES \;
- name: Build RPM
shell: bash
env:
@@ -45,14 +58,22 @@ runs:
- name: Upload package
shell: bash
env:
SPEC_FILE_PATH: ${{ inputs.spec-file-path }}
REPOSITORY_URL: ${{ inputs.repository-url }}
PACKAGE_GROUP: ${{ inputs.package-group }}
GITEA_ACTOR: ${{ gitea.actor }}
REPOSITORY_OWNER: ${{ gitea.repository_owner }}
UPLOAD_USER: ${{ inputs.repository-user }}
UPLOAD_USER_TOKEN: ${{ inputs.repository-user-token }}
run: |
PACKAGE_NAME=$(basename -s .spec ${SPEC_FILE_PATH})
echo "Goal package to upload: ${PACKAGE_NAME}"
RPM_PATH="./rpmbuild/RPMS/"
echo "Searching in ${RPM_PATH}"
find ./rpmbuild/RPMS/ -type f -name "*.rpm"
UPLOAD_URL="${REPOSITORY_URL}/api/packages/${REPOSITORY_OWNER}/rpm/${PACKAGE_GROUP}/upload"
echo "Uploading to url: ${UPLOAD_URL}"
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 \;
${UPLOAD_URL} \;

View File

@@ -1,11 +1,19 @@
#!/usr/bin/env bash
dnf -y config-manager addrepo --from-repofile=https://git.hydrosaber.com/api/packages/hydros/rpm/f43.repo
echo "--- Start adding repos and priorities ---"
dnf5 -y config-manager addrepo --from-repofile=https://git.hydrosaber.com/api/packages/hydros/rpm/f43.repo
dnf -y install rpmdevtools
echo "--- Setup workspace and packages ---"
dnf5 -y install rpmdevtools
rpmdev-setuptree
dnf -y builddep $1
dnf5 -y builddep $1
echo "--- Download sources ---"
rpmdev-spectool -g -C ~/rpmbuild/SOURCES $1
rpmbuild --nodebuginfo --bb $1
echo "--- Add patches ---"
cp ~/rpmbuild/PATCHES/* ~/rpmbuild/SOURCES
echo "--- Build RPM packages ---"
rpmbuild --nodebuginfo --bb $1 && echo "--- Done! ---"