From 19fb47680d5078ec92674a3022dace191a6829b3 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Thu, 10 Oct 2024 11:00:05 +0800 Subject: [PATCH] Install oc if it is not present Today, there was a failure job "Check READMEs" due to nonexisting oc command. It's because GH runner image ubuntu-latest is pointing to ubuntu-24.04, from where OpenShift CLI 4.17.0 is removed. Signed-off-by: Chenxiong Qi --- .github/workflows/check-readmes.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/check-readmes.yaml b/.github/workflows/check-readmes.yaml index 6a9edf75ed..d9568a6420 100644 --- a/.github/workflows/check-readmes.yaml +++ b/.github/workflows/check-readmes.yaml @@ -10,6 +10,14 @@ jobs: - name: Check out code uses: actions/checkout@v4 + - name: Install oc + run: | + set -euo pipefail + url=https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.17/openshift-client-linux.tar.gz + if ! which oc; then + curl --fail --no-progress-meter -L "$url" | gzip -cd | sudo -- tar -x -C /usr/bin oc + fi + - name: Check pipeline READMEs run: | #!/bin/bash