2022-03-01 15:39:26 +01:00
|
|
|
# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
|
|
|
|
|
|
|
# Workflow name
|
|
|
|
name: AlmaLinux 8.5 RPM build
|
|
|
|
|
2022-03-02 13:21:54 +01:00
|
|
|
# Run on tag push
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '**'
|
2022-03-01 15:39:26 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
#
|
2022-03-01 17:15:20 +01:00
|
|
|
# Build on AlmaLinux 8.5 using go-toolset
|
2022-03-01 15:39:26 +01:00
|
|
|
#
|
|
|
|
AlmaLinux-RPM-build:
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-01 17:15:20 +01:00
|
|
|
# See: https://hub.docker.com/_/almalinux
|
2022-03-01 15:39:26 +01:00
|
|
|
container: almalinux:8.5
|
|
|
|
steps:
|
|
|
|
|
|
|
|
# Use dnf to install development packages
|
|
|
|
- name: Install development packages
|
|
|
|
run: dnf --assumeyes group install "Development Tools" "RPM Development Tools"
|
|
|
|
|
|
|
|
# Checkout git repository and submodules
|
|
|
|
# fetch-depth must be 0 to use git describe
|
|
|
|
# See: https://github.com/marketplace/actions/checkout
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
# Use dnf to install build dependencies
|
|
|
|
- name: Install build dependencies
|
|
|
|
run: dnf --assumeyes builddep scripts/cc-metric-collector.spec
|
|
|
|
|
|
|
|
- name: RPM build MetricCollector
|
|
|
|
id: rpmbuild
|
|
|
|
run: make RPM
|
|
|
|
|
|
|
|
# See: https://github.com/actions/upload-artifact
|
|
|
|
- name: Save RPM as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-03-01 17:15:20 +01:00
|
|
|
name: cc-metric-collector RPM for AlmaLinux 8.5
|
2022-03-01 15:39:26 +01:00
|
|
|
path: ${{ steps.rpmbuild.outputs.RPM }}
|
|
|
|
- name: Save SRPM as artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-03-01 17:15:20 +01:00
|
|
|
name: cc-metric-collector SRPM for AlmaLinux 8.5
|
2022-03-01 15:39:26 +01:00
|
|
|
path: ${{ steps.rpmbuild.outputs.SRPM }}
|
|
|
|
|
|
|
|
# See: https://github.com/softprops/action-gh-release
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
with:
|
|
|
|
name: cc-metric-collector-${{github.ref_name}}
|
|
|
|
files: |
|
|
|
|
${{ steps.rpmbuild.outputs.RPM }}
|
2022-03-01 17:15:20 +01:00
|
|
|
${{ steps.rpmbuild.outputs.SRPM }}
|