From b26f385e05b169f019cad05c0a2806c8d3793eaf Mon Sep 17 00:00:00 2001 From: Yevhen Ivantsov Date: Mon, 29 Jan 2024 13:39:28 +1100 Subject: [PATCH] Ubuntu --- .github/workflows/openshift.yaml | 40 ++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/openshift.yaml b/.github/workflows/openshift.yaml index f44206e7a..97ff9ae6a 100644 --- a/.github/workflows/openshift.yaml +++ b/.github/workflows/openshift.yaml @@ -7,7 +7,7 @@ on: - openshift-ci jobs: openshift: - runs-on: macos-latest + runs-on: ubuntu-latest permissions: id-token: write contents: read @@ -30,16 +30,36 @@ jobs: - name: Fetch OpenShift binary run: | - aws s3api get-object --bucket openshift-local --key macos/crc-macos-installer.pkg crc-macos-installer.pkg + aws s3api get-object --bucket openshift-local --key crc crc + chmod +x crc - - name: Create OpenShift Cluster + - 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: Remove unwanted stuff to free up disk image + 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: | echo ${{ secrets.OPENSHIFT_PULL_SECRET }} > pull-secret.txt - sudo installer -pkg crc-macos-installer.pkg -target / - crc version - crc config set consent-telemetry no - mkdir -p ~/.crc/cache - wget -q --show-progress https://developers.redhat.com/content-gateway/file/pub/openshift-v4/clients/crc/bundles/openshift/4.14.7/crc_vfkit_4.14.7_amd64.crcbundle -O ~/.crc/cache/crc_vfkit_4.14.7_amd64.crcbundle - crc setup - crc start -p pull-secret.txt --log-level debug \ No newline at end of file + cat pull-secret.txt + ./crc config set consent-telemetry no + ./crc config set preset okd + ./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 --log-level debug \ No newline at end of file