diff --git a/.github/workflows/AlmaLinux.yml b/.github/workflows/AlmaLinux.yml index b1b94c1..f014e7e 100644 --- a/.github/workflows/AlmaLinux.yml +++ b/.github/workflows/AlmaLinux.yml @@ -35,12 +35,7 @@ jobs: - name: RPM build MetricCollector id: rpmbuild - run: | - make RPM - RPM=~/rpmbuild/RPMS/*/*.rpm - SRPM=~/rpmbuild/SRPMS/*.src.rpm - echo ::set-output name="SRPM::${SRPM}" - echo ::set-output name="RPM::${RPM}" + run: make RPM # See: https://github.com/actions/upload-artifact - name: Save RPM as artifact diff --git a/Makefile b/Makefile index ce5255a..5256350 100644 --- a/Makefile +++ b/Makefile @@ -76,4 +76,9 @@ RPM: scripts/cc-metric-collector.spec # Build RPM and SRPM @rpmbuild -ba --define="VERS $${VERS}" --rmsource --clean "$${SPECFILE}" # Report RPMs and SRPMs when in GitHub Workflow - @printenv + @if [[ "$${GITHUB_ACTIONS}" == true ]]; then + @ RPMFILES="$${RPMDIR}"/*/*.rpm + @ SRPMFILES="$${SRPMDIR}"/*.src.rpm + @ echo ::set-output name="SRPM::$${SRPM}" + @ echo ::set-output name="RPM::$${RPM}" + @fi