From 31124ebf601ec18041dcc5b8cc16e321eaba9d90 Mon Sep 17 00:00:00 2001 From: Jean du Plessis Date: Tue, 12 Mar 2024 12:48:27 +0200 Subject: [PATCH] Switches CI workflow to use OCI runner --- .cirun.yml | 15 +++++++++++++++ .github/workflows/ci.yml | 10 +++++----- 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 .cirun.yml diff --git a/.cirun.yml b/.cirun.yml new file mode 100644 index 00000000..f26139b9 --- /dev/null +++ b/.cirun.yml @@ -0,0 +1,15 @@ +# Self-Hosted Github Action Runners on Oracle Cloud via Cirun.io +# Reference: https://docs.cirun.io/reference/yaml +runners: + - name: "oci-cncf-runner" + cloud: "oracle" + # https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#vm-standard + instance_type: "VM.Standard.E4.Flex" + # https://docs.oracle.com/en-us/iaas/images/ + machine_image: "ocid1.image.oc1.us-sanjose-1.aaaaaaaavslpj7yhhuswzti6cucy2qofpb3vbijj4tw5q53d7j3dwpnxj7ta" + # https://docs.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm + region: "us-sanjose-1" + # Add this label in the "runs-on" param in .github/workflows/.yml + # So that this runner is created for running the workflow + labels: + - "oci-cncf-runner" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a0bffaa..665e8fc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ env: AWS_USR: ${{ secrets.AWS_USR }} jobs: - detect-noop: - runs-on: ubuntu-20.04 + detect-noop: + runs-on: "oci-cncf-runner--${{ github.run_id }}" outputs: noop: ${{ steps.noop.outputs.should_skip }} steps: @@ -40,7 +40,7 @@ jobs: concurrent_skipping: false lint: - runs-on: ubuntu-20.04 + runs-on: "oci-cncf-runner--${{ github.run_id }}" needs: detect-noop if: needs.detect-noop.outputs.noop != 'true' @@ -89,7 +89,7 @@ jobs: version: ${{ env.GOLANGCI_VERSION }} check-diff: - runs-on: ubuntu-20.04 + runs-on: "oci-cncf-runner--${{ github.run_id }}" needs: detect-noop if: needs.detect-noop.outputs.noop != 'true' @@ -131,7 +131,7 @@ jobs: run: make check-diff unit-tests: - runs-on: ubuntu-20.04 + runs-on: "oci-cncf-runner--${{ github.run_id }}" needs: detect-noop if: needs.detect-noop.outputs.noop != 'true'