Skip to content

Commit

Permalink
Test action build rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Dec 3, 2024
1 parent e5f6f3d commit 9f9bf97
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ jobs:
- name: Set matrix
id: set-matrix
run: |
package_types=()
[[ "${{ steps.changes.outputs.build_deb }}" == "true" ]] && package_types+=("deb")
[[ "${{ steps.changes.outputs.build_rpm }}" == "true" ]] && package_types+=("rpm")
package_types=(
$([[ "${{ steps.changes.outputs.build_deb }}" == "true" ]] && echo "deb")
$([[ "${{ steps.changes.outputs.build_rpm }}" == "true" ]] && echo "rpm")
)
[[ ${#package_types[@]} -eq 0 ]] && exit 0
matrix=$(printf '%s\n' "${package_types[@]}" | jq -R . | jq -sc '{include: map({packageType: .})}')
echo "matrix=$matrix" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -166,7 +167,14 @@ jobs:
EOF
gpg --export --armor --output onlyoffice-gpgkey.pub
rpm --import onlyoffice-gpgkey.pub
rpm --addsign ${PACKAGE_DIRECTORY}/install/rpm/SPECS/RPMS/noarch/*.rpm
for rpm_package in ${{ env.PACKAGE_DIRECTORY }}/install/rpm/SPECS/RPMS/noarch/*.rpm; do
if [ -f "$rpm_package" ]; then
rpm --addsign "$rpm_package"
echo "Signed: $rpm_package"
else
echo "No RPM packages found to sign in directory."
fi
done
- name: Upload DEB Packages
if: matrix.packageType == 'deb'
Expand All @@ -183,7 +191,8 @@ jobs:
run: |
set -e
echo "Starting RPM package upload..."
for rpm_package in ${PACKAGE_DIRECTORY}/install/rpm/SPECS/RPMS/noarch/*.rpm; do
for rpm_package in ${{ env.PACKAGE_DIRECTORY }}/install/rpm/SPECS/RPMS/noarch/*.rpm; do
echo "Processing: $rpm_package"
response=$(curl --silent --write-out "%{http_code}" --output /dev/null \
--user "${{ secrets.REPO_LOGIN }}:${{ secrets.REPO_PASS }}" \
Expand Down
2 changes: 1 addition & 1 deletion install/rpm/SPECS/SOURCES/product.rpmlintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Ignoring node_modules errors due to lack of ability to influence them
## Ignoring node_modules errors due to lack of ability to influence them
addFilter(r'node_modules')

# Packages use a non-standard user and group for our project directories, but the user and group are created in %pre common
Expand Down

0 comments on commit 9f9bf97

Please sign in to comment.