diff --git a/actions/install-automation-components/action.yml b/actions/install-automation-components/action.yml index 57c4f8c..c74bb69 100644 --- a/actions/install-automation-components/action.yml +++ b/actions/install-automation-components/action.yml @@ -12,6 +12,8 @@ runs: echo "os=ubuntu" | tee -a "$GITHUB_OUTPUT" elif command -v microdnf &>/dev/null; then echo "os=ubi-minimal" | tee -a "$GITHUB_OUTPUT" + elif command -v dnf &>/dev/null; then + echo "os=rhel" | tee -a "$GITHUB_OUTPUT" else echo "::error::unknown OS" exit 1 @@ -40,3 +42,10 @@ runs: curl -L https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/gh-cli.repo sudo microdnf install -y gh fi + - shell: bash + if: steps.check_os.outputs.os == 'rhel' + run: |- + if ! command -v gh &>/dev/null; then + curl -L https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/gh-cli.repo + sudo dnf install -y gh + fi