|
1 |
| -# crc-github-action |
2 |
| -github action for crc |
| 1 | +# CRC GitHub Action |
| 2 | + |
| 3 | +The CRC GitHub Action is a custom GitHub Action designed to integrate CRC into your CI/CD workflows. |
| 4 | +This action facilitates the setup, start, and management of CRC instances directly within your GitHub |
| 5 | +Actions pipelines, enabling seamless testing and development of your workload on OpenShift/MicroShift. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Automated CRC Setup**: Installs and configures CRC on the runner. |
| 10 | +- **Cluster Management**: Starts CRC cluster. |
| 11 | +- **Environment Configuration**: Sets up necessary environment variables for cluster access. |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +To incorporate the CRC GitHub Action into your workflow, include the following steps in your GitHub Actions YAML file: |
| 16 | + |
| 17 | +```yaml |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - name: Checkout code |
| 23 | + uses: actions/checkout@v4 |
| 24 | + |
| 25 | + - name: Set up CRC |
| 26 | + uses: praveenkumar/crc-github-action@v1 |
| 27 | + with: |
| 28 | + pull-secret: ${{ secrets.CRC_PULL_SECRET }} |
| 29 | + preset: openshift/microshift/okd (default is microshift) |
| 30 | + memory: <In MiB, if you want to change from default> |
| 31 | + cpus: < int, if you want to change from default> |
| 32 | + disk: <In GiB, if you want to change from default> |
| 33 | + |
| 34 | + # Additional steps for your workflow |
| 35 | +``` |
| 36 | + |
| 37 | +### Inputs |
| 38 | + |
| 39 | +| Name | Description | Required | Default | |
| 40 | +|---------------|---------------------------------------------------------------|----------|-------------------| |
| 41 | +| `pull-secret` | The pull secret for CRC, typically stored as a GitHub secret. | No | dummy | |
| 42 | +| `preset` | Available preset (openshift/microshift/okd). | No | `'microshift'` | |
| 43 | +| `cpus` | Number of cpus (default as per preset) (integer value) | No | `'as per preset'` | |
| 44 | +| `memory` | Memory in MiB (default as per preset) (integer value) | No | `'as per preset'` | |
| 45 | +| `disk` | disk size in GiB (default as per preset) (integer value) | No | `'as per preset'` | |
| 46 | + |
| 47 | +#### Example |
| 48 | +- https://github.com/praveenkumar/simple-go-server/blob/main/.github/workflows/crc_linux.yaml |
0 commit comments