-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (70 loc) · 2.28 KB
/
rpm_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: RPM Build
on:
push:
branches:
- '*'
tags:
- 'v*'
jobs:
repo_version:
runs-on: ubuntu-latest
outputs:
version_output: ${{ steps.step1.outputs.version }}
steps:
- name: Verify context
run: |
echo "ref is ${{ github.ref }}"
echo "ref_type is ${{ github.ref_type }}"
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Get Version
id: step1
run: echo "version=$(./git-version-gen)" >> $GITHUB_OUTPUT
rpm_build:
runs-on: ubuntu-latest
needs: repo_version
container:
image: centos:8
env:
NODE_ENV: development
ports:
- 80
options: --cpus 1
steps:
- name: "Build context"
env:
VERSION_OUTPUT: ${{ needs.repo_version.outputs.version_output }}
run: |
echo "ref is ${{ github.ref }}"
echo "ref_type is ${{ github.ref_type }}"
echo "head.sha is ${{ github.event.pull_request.head.sha }}"
echo "git-version-gen is $VERSION_OUTPUT"
- name: checkout
uses: actions/checkout@v3
- name: environment setup
env:
VERSION_OUTPUT: ${{ needs.repo_version.outputs.version_output }}
run: |
dnf -y --disablerepo '*' --enablerepo=extras swap centos-linux-repos centos-stream-repos
dnf -y distro-sync
dnf -y makecache --refresh
dnf install -y rpm-build rpmdevtools git make
dnf module -y install go-toolset
rpmdev-setuptree
echo $VERSION_OUTPUT > .rpmversion
cat .rpmversion
tar -czf /github/home/rpmbuild/SOURCES/nnf-datamovement-1.0.tar.gz --transform 's,^,nnf-datamovement-1.0/,' .
- name: build rpms
run: rpmbuild -ba daemons/compute/server/nnf-dm.spec
- name: upload rpms
uses: actions/upload-artifact@v3
with:
name: nnf-datamovement-1.0-1.el8.x86_64.rpm
path: /github/home/rpmbuild/RPMS/x86_64/nnf-datamovement-1.0-1.el8.x86_64.rpm
- name: upload srpms
uses: actions/upload-artifact@v3
with:
name: nnf-datamovement-1.0-1.el8.src.rpm
path: /github/home/rpmbuild/SRPMS/nnf-datamovement-1.0-1.el8.src.rpm