Skip to content

Commit

Permalink
Add RHEL to the OCI check action
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk committed Jan 16, 2025
1 parent 5133f2b commit 21023c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/ci-oci-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- 'install/OneClickInstall/install-RedHat/**'
- 'install/OneClickInstall/install-Debian.sh'
- 'install/OneClickInstall/install-RedHat.sh'
push:
paths:
- '.github/workflows/ci-oci-install.yml'

schedule:
- cron: '00 20 * * 6' # At 23:00 on Saturday.
Expand Down Expand Up @@ -47,6 +50,14 @@ on:
type: boolean
description: 'Fedora 40'
default: true
rhel8:
type: boolean
description: 'RHEL 8'
default: true
rhel9:
type: boolean
description: 'RHEL 9'
default: true

jobs:
prepare:
Expand All @@ -73,21 +84,15 @@ jobs:
run: |
matrix=$(echo '{
"include": [
{"execute": '${{ github.event.inputs.centos9s || true }}', "name": "CentOS9S", "os": "centos9s", "distr": "generic"},
{"execute": '${{ github.event.inputs.debian11 || true }}', "name": "Debian11", "os": "debian11", "distr": "generic"},
{"execute": '${{ github.event.inputs.debian12 || true }}', "name": "Debian12", "os": "debian12", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu2004 || true }}', "name": "Ubuntu20.04", "os": "ubuntu2004", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu2204 || true }}', "name": "Ubuntu22.04", "os": "ubuntu2204", "distr": "generic"},
{"execute": '${{ github.event.inputs.ubuntu2404 || true }}', "name": "Ubuntu24.04", "os": "ubuntu-24.04", "distr": "bento"},
{"execute": '${{ github.event.inputs.fedora39 || true }}', "name": "Fedora39", "os": "39-cloud-base", "distr": "fedora"},
{"execute": '${{ github.event.inputs.fedora40 || true }}', "name": "Fedora40", "os": "fedora-40", "distr": "bento"}
{"execute": '${{ github.event.inputs.rhel8 || true }}', "name": "RHEL8", "os": "rhel8", "distr": "generic"},
{"execute": '${{ github.event.inputs.rhel9 || true }}', "name": "RHEL9", "os": "rhel9", "distr": "generic"}
]
}' | jq -c '.include')
matrix=$(jq -c --arg REDHAT_CHANGED "${{ env.redhat_changed }}" --arg DEBIAN_CHANGED "${{ env.debian_changed }}" '
{ include: [.[] | select(
($REDHAT_CHANGED == $DEBIAN_CHANGED and .execute == true) or
($REDHAT_CHANGED == "true" and (.name | test("CentOS|Fedora"))) or
($REDHAT_CHANGED == "true" and (.name | test("CentOS|RHEL|Fedora"))) or
($DEBIAN_CHANGED == "true" and (.name | test("Debian|Ubuntu"))))]
}' <<< "$matrix")
Expand Down
4 changes: 4 additions & 0 deletions tests/vagrant/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ function prepare_vm() {
yum -y install centos*-release
;;

rhel)
[[ "${TEST_REPO_ENABLE}" == 'true' ]] && add-repo-rpm
;;

*)
echo "${COLOR_RED}Failed to determine Linux dist${COLOR_RESET}"; exit 1
;;
Expand Down

0 comments on commit 21023c2

Please sign in to comment.