Skip to content

Commit

Permalink
build: containerized rpm build
Browse files Browse the repository at this point in the history
  • Loading branch information
rootfs committed Mar 14, 2023
1 parent 184ae3e commit c28907d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,16 @@ jobs:
_ARCH_: ${{ github.event.inputs.arch }}
run: |
make containerized_build_rpm
cd _output/rpmbuild/
sudo tar czvf /tmp/kepler.rpm.tar.gz RPMS/
- if: startsWith(github.event.ref, 'refs/tags/')
name: Release
uses: softprops/action-gh-release@master
with:
files: |
kepler-*.rpm.tar.gz
/root/rpmbuild/RPMs/
kepler.rpm.tar.gz
/tmp/kepler.rpm.tar.gz
create-release-branch:
name: Create release branch
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ build_rpm:
rpmbuild packaging/rpm/kepler.spec --build-in-place -bb

containerized_build_rpm:
sudo mkdir -p /root/rpmbuild
@mkdir -p $(base_dir)/$(OUTPUT_DIR)/rpmbuild
$(CTR_CMD) run --rm \
-v $(base_dir):/kepler:Z -w /kepler -v /root/rpmbuild:/root/rpmbuild \
-v $(base_dir):/kepler:Z -w /kepler -v $(base_dir)/$(OUTPUT_DIR)/rpmbuild:/root/rpmbuild \
-e _VERSION_=${_VERSION_} -e _RELEASE_=${_RELEASE_} -e _ARCH_=${_ARCH_} \
-e _TIMESTAMP_="$(shell date)" -e _COMMITTER_=${_COMMITTER_} -e _CHANGELOG_=${_CHANGELOG_} \
-e GOROOT=/usr/local/go -e PATH=$(PATH):/usr/local/go/bin \
Expand Down

0 comments on commit c28907d

Please sign in to comment.