Updates #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: OpenShift Local Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- openshift-ci | |
jobs: | |
openshift: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Write pull secret file | |
run: | | |
echo "${{ secrets.OPENSHIFT_PULL_SECRET }}" | base64 -d > pull-secret.txt | |
- name: Fetch crc binary | |
run: | | |
CRC_VERSION="2.31.0" | |
wget -q https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/${CRC_VERSION}/crc-linux-amd64.tar.xz | |
tar -xvf crc-linux-amd64.tar.xz | |
sudo cp crc-linux-${CRC_VERSION}-amd64/crc /usr/bin/crc | |
sudo chmod a+x /usr/bin/crc | |
- name: Fetch oc binary | |
run: | | |
wget -q https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable-4.14/openshift-client-linux.tar.gz | |
tar -xvf openshift-client-linux.tar.gz | |
sudo cp oc /usr/bin/oc | |
sudo chmod a+x /usr/bin/oc | |
- name: Install required virtualization software | |
run: | | |
sudo apt-get update | |
sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system | |
sudo usermod -a -G libvirt $USER | |
- name: Free up disk | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /usr/local/lib/android | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf /opt/hostedtoolcache/CodeQL | |
sudo docker image prune --all --force | |
sudo swapoff -a | |
sudo rm -f /mnt/swapfile | |
- name: Set the crc config | |
run: | | |
crc config set consent-telemetry no | |
crc config set network-mode user | |
- name: Setup the crc | |
run: sudo -su $USER crc setup | |
- name: Start the crc | |
run: sudo -su $USER crc start -p pull-secret.txt | |
- name: Get crc info | |
run: | | |
export KUBECONFIG="/home/runner/.crc/machines/crc/kubeconfig" | |
oc get co |