Skip to content

Commit

Permalink
Install oc if it is not present
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tkdchen committed Oct 11, 2024
1 parent 4e3171e commit 19fb476
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/check-readmes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19fb476

Please sign in to comment.