-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (49 loc) · 1.92 KB
/
build_all_RPMs.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
#
# SELinux policy module RPMs build
#
name: "Build RPMs to install compiled SELinux policy module"
concurrency:
group: SELinux_compile_wkf_group
on:
release:
types: [ published ]
workflow_dispatch:
jobs:
get_release_info:
name: Get release info
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.get_release_url.outputs.upload_url }}
version_number: ${{ steps.get_release_version.outputs.version }}
release_number: ${{ steps.get_release_version.outputs.release }}
steps:
- name: Checkout code
uses: actions/checkout@master
with:
ref: ${{ github.ref }}
- name: Get release
id: get_release_url
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Retrieve version and release numbers
id: get_release_version
run: |
version_from_tag=$( echo "${{ github.ref_name }}" | sed -E 's,^v?([0-9]+\.[0-9]+\.[0-9]+).*$,\1,' )
release_from_tag=$( echo "${{ github.ref_name }}" | sed -E 's,^v?[0-9]+\.[0-9]+\.[0-9]+(-([0-9]+))?.*$,\2,' )
[ -z "${release_from_tag}" ] && release_from_tag=0
echo "::set-output name=version::${version_from_tag}"
echo "::set-output name=release::${release_from_tag}"
build_RPMs:
name: Build RPMs and upload them to release
needs: get_release_info
uses: lhqg/build_selinux_rpm/.github/workflows/generic_semodule_build.yml@main
secrets:
gpg_private_key: ${{ secrets.RPM_SIGNING_KEY }}
gpg_private_key_password: ${{ secrets.RPM_SIGNING_KEY_PASSWORD }}
with:
spec_file_location: rpm/
selinux_files_location: se_module/
release_upload_url: ${{ needs.get_release_info.outputs.upload_url }}
provided_version: ${{ needs.get_release_info.outputs.version_number }}
provided_release: ${{ needs.get_release_info.outputs.release_number }}