Skip to content

Commit

Permalink
Include recommends in test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
shore committed Sep 9, 2024
1 parent aa846ae commit 388d05e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 4 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,48 @@ jobs:
file_permissions: 0o027
user_owner: root
group_owner: vault
rpm_depends: bash
rpm_recommends: dmidecode
deb_depends: bash
deb_recommends: dmidecode

- uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5
with:
name: artifacts
path: out
if-no-files-found: 'error'
overwrite: true # only need one set of artifacts

# Note: "suggested" is always empty, as nFPM does not (yet?) support it.
- name: dump RPM
run: |
/bin/ls -l out/
echo "::group::maybe install rpm" 1>&2
# runner is ubuntu, install rpm if it's not already available
which rpm || apt install -y rpm
which rpm || apt-get install -y rpm
echo "::endgroup::" 1>&2
echo "::group::package contents" 1>&2
rpm -qplv out/*.rpm
echo "::endgroup::" 1>&2
echo "::group::dependencies" 1>&2
rpm -qpv --requires out/*.rpm
echo "::endgroup::" 1>&2
echo "::group::weak dependencies: recommended packages" 1>&2
rpm -qpv --recommends out/*.rpm
echo "::endgroup::" 1>&2
echo "::group::weak dependencies: suggested packages" 1>&2
rpm -qpv --suggests out/*.rpm
echo "::endgroup::" 1>&2
- name: dump deb
run: |
dpkg -c out/*.deb
/bin/ls -l out/
echo "::group::package contents" 1>&2
dpkg -c ./out/*.deb
echo "::endgroup::" 1>&2
echo "::group::dependencies and recommended packages" 1>&2
apt-get show ./out/*.deb | grep -E '^(Depends|Recommends|Suggests):' || true
echo "::endgroup::" 1>&2
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,5 +255,5 @@ runs:
nfpm package -f "$config_file" -p "$pkg_type" -t ./out/
}
package rpm "$INPUT_RPM_DEPENDS"
package deb "$INPUT_DEB_DEPENDS"
package rpm "$INPUT_RPM_DEPENDS" "$INPUT_RPM_RECOMMENDS"
package deb "$INPUT_DEB_DEPENDS" "$INPUT_DEB_RECOMMENDS"

0 comments on commit 388d05e

Please sign in to comment.