Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hubertqc committed Sep 17, 2024
1 parent 78f5182 commit 47f3695
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build_all_RPMs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
with:
ref: ${{ github.ref }}

- name: Get release
- name: Get release upload URL
id: get_release_url
uses: bruceadams/get-release@v1.2.3
uses: bruceadams/get-release@v1.3.2
env:
GITHUB_TOKEN: ${{ github.token }}

Expand All @@ -40,8 +40,8 @@ jobs:
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}"
echo "{version}=${version_from_tag}" >> $GITHUB_OUTPUT
echo "{release}=${release_from_tag}" >> $GITHUB_OUTPUT
build_RPMs:
name: Build RPMs and upload them to release
Expand All @@ -56,4 +56,4 @@ jobs:
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 }}


25 changes: 12 additions & 13 deletions .github/workflows/validate_selinux_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@almalinux8

compile_el9:
Expand All @@ -42,39 +42,39 @@ jobs:
continue-on-error: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@centos9

compile_fedora37:
name: Validate SELinux code (Fedora 37)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@fedora37

compile_fedora38:
name: Validate SELinux code (Fedora 38)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@fedora38

compile_fedora39:
name: Validate SELinux code (Fedora 39)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@fedora39

compile_fedora40:
name: Validate SELinux code (Fedora 40)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master
- uses: lhqg/selinux_compile@fedora40

semodule_info:
Expand All @@ -92,7 +92,7 @@ jobs:
semodule_vers: ${{ steps.semodule_chars.outputs.semodule_vers }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master

- name: Get SELinux policy module characteristics
id: semodule_chars
Expand All @@ -111,10 +111,9 @@ jobs:
module_vers=a[2]
}
END {
print "::set-output name=semodule_name::"module_name
print "::set-output name=semodule_vers::"module_vers
}' se_module/${SEMODULE}.te
print "{semodule_name}="module_name"}"
print "{semodule_vers}="module_vers"}"
}' se_module/${SEMODULE}.te >> $GITHUB_OUTPUT
add_tag:
name: Add SELinux module version tag on the branch
Expand All @@ -125,7 +124,7 @@ jobs:
if: ( github.event_name == 'push' && ( github.ref_name == 'main' || startsWith(github.ref_name, 'release/') ) )

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@master

- name: Tag the branch with the SELinux module version and draft a pre-release
uses: actions/create-release@latest
Expand All @@ -136,4 +135,4 @@ jobs:
release_name: Release candidate for v${{ needs.semodule_info.outputs.semodule_vers }}
draft: true
prerelease: true


0 comments on commit 47f3695

Please sign in to comment.