cr: add CR config for container image building #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build RPM Package | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "v*.*.*" | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest-16-cores | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: dtolnay/[email protected] | |
- name: Build RPM package | |
run: | | |
make create-tarball | |
make rpm-build-in-docker | |
mkdir -p $GITHUB_WORKSPACE/rpmbuild | |
cp -r ~/rpmbuild/SRPMS/ $GITHUB_WORKSPACE/rpmbuild/ | |
cp -r ~/rpmbuild/RPMS/ $GITHUB_WORKSPACE/rpmbuild/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rpm-packages | |
path: | | |
./rpmbuild/SRPMS/*.src.rpm | |
./rpmbuild/RPMS/*/*.rpm | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
./rpmbuild/SRPMS/*.src.rpm | |
./rpmbuild/RPMS/*/*.rpm |