upload rpm
This commit is contained in:
1 parent
74f0d99df5
commit
cf12514c86
1 file changed
+11
-8
@@ -82,13 +82,15 @@ jobs:
|
||||
tar -xzf "${{ steps.check_release.outputs.file }}" --strip-components=1
|
||||
|
||||
- name: Build RPM
|
||||
id: build_rpm
|
||||
if: steps.check_release_exists.outputs.exists != 'true'
|
||||
run: |
|
||||
cp source/share/rpm/environment-modules.spec.in environment-modules.spec
|
||||
VERSION="${{ steps.check_release.outputs.latest_tag }}"
|
||||
RELEASE="1"
|
||||
VERSION="${VERSION#v}" # remove leading 'v' if present
|
||||
sed -i "s/^Version:.*/Version: ${VERSION}/" environment-modules.spec
|
||||
sed -i "s|@MODULES_RPM_RELEASE@|1|g" environment-modules.spec
|
||||
sed -i "s|@MODULES_RPM_RELEASE@|$RELEASE|g" environment-modules.spec
|
||||
sed -i "s|@MODULES_RELEASE@|$VERSION|g" environment-modules.spec
|
||||
sed -i "s|@MODULES_BUILD@||g" environment-modules.spec
|
||||
sed -i "s/^Source0:.*/Source0: modules-${VERSION}.tar.gz/" environment-modules.spec
|
||||
@@ -100,6 +102,7 @@ jobs:
|
||||
dnf -y builddep environment-modules.spec
|
||||
rpmbuild -ba environment-modules.spec
|
||||
find /data/RPMS
|
||||
echo "file=/data/RPMS/x86_64/environment-modules-${VERSION}-${RELEASE}.el9.x86_64.rpm" >> $GITHUB_OUTPUT
|
||||
|
||||
# - name: Upload RHEL8 RPM to Gitea
|
||||
# if: steps.check_release_exists.outputs.exists != 'true'
|
||||
@@ -109,13 +112,13 @@ jobs:
|
||||
# token: "${{ secrets.PACKAGES_DEPLOY_TOKEN }}"
|
||||
# files: "${{ steps.check_release.outputs.file }}"
|
||||
|
||||
# - name: Upload RHEL9 RPM to Gitea
|
||||
# if: steps.check_release_exists.outputs.exists != 'true'
|
||||
# uses: actions/upload-rpm@v1
|
||||
# with:
|
||||
# owner: lx_packages_rhel9
|
||||
# token: "${{ secrets.PACKAGES_DEPLOY_TOKEN }}"
|
||||
# files: "${{ steps.check_release.outputs.file }}"
|
||||
- name: Upload RHEL9 RPM to Gitea
|
||||
if: steps.check_release_exists.outputs.exists != 'true'
|
||||
uses: actions/upload-rpm@v1
|
||||
with:
|
||||
owner: lx_packages_rhel9
|
||||
token: "${{ secrets.PACKAGES_DEPLOY_TOKEN }}"
|
||||
files: "${{ steps.build_rpm.outputs.file }}"
|
||||
|
||||
# - name: Upload RHEL10 RPM to Gitea
|
||||
# if: steps.check_release_exists.outputs.exists != 'true'
|
||||
|
||||
Reference in new issue
Block a user