-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from praveenkumar/add_mem_cpu_disk
Update readme around how to consume
- Loading branch information
Showing
1 changed file
with
48 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,48 @@ | ||
# crc-github-action | ||
github action for crc | ||
# CRC GitHub Action | ||
|
||
The CRC GitHub Action is a custom GitHub Action designed to integrate CRC into your CI/CD workflows. | ||
This action facilitates the setup, start, and management of CRC instances directly within your GitHub | ||
Actions pipelines, enabling seamless testing and development of your workload on OpenShift/MicroShift. | ||
|
||
## Features | ||
|
||
- **Automated CRC Setup**: Installs and configures CRC on the runner. | ||
- **Cluster Management**: Starts CRC cluster. | ||
- **Environment Configuration**: Sets up necessary environment variables for cluster access. | ||
|
||
## Usage | ||
|
||
To incorporate the CRC GitHub Action into your workflow, include the following steps in your GitHub Actions YAML file: | ||
|
||
```yaml | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up CRC | ||
uses: praveenkumar/crc-github-action@v1 | ||
with: | ||
pull-secret: ${{ secrets.CRC_PULL_SECRET }} | ||
preset: openshift/microshift/okd (default is microshift) | ||
memory: <In MiB, if you want to change from default> | ||
cpus: < int, if you want to change from default> | ||
disk: <In GiB, if you want to change from default> | ||
|
||
# Additional steps for your workflow | ||
``` | ||
|
||
### Inputs | ||
|
||
| Name | Description | Required | Default | | ||
|---------------|---------------------------------------------------------------|----------|-------------------| | ||
| `pull-secret` | The pull secret for CRC, typically stored as a GitHub secret. | No | dummy | | ||
| `preset` | Available preset (openshift/microshift/okd). | No | `'microshift'` | | ||
| `cpus` | Number of cpus (default as per preset) (integer value) | No | `'as per preset'` | | ||
| `memory` | Memory in MiB (default as per preset) (integer value) | No | `'as per preset'` | | ||
| `disk` | disk size in GiB (default as per preset) (integer value) | No | `'as per preset'` | | ||
|
||
#### Example | ||
- https://github.com/praveenkumar/simple-go-server/blob/main/.github/workflows/crc_linux.yaml |