Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mem/cpu/disk-size option to action #1

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/crc-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ jobs:

- name: CRC Action
uses: ./

with:
cpus: 4
memory: 6098
disk: 40

21 changes: 21 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ inputs:
description: 'preset to use for CRC microshift/okd/openshift (default microshift).'
required: true
default: 'microshift'
cpus:
description: 'number of cpu consume by crc instance'
required: false
memory:
description: 'memory in MiB consume by crc instance'
required: false
disk:
description: 'disk size consumed by crc instance'
required: false
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -64,6 +73,18 @@ runs:
crc config set preset ${PRESET}
crc config set pull-secret-file pull-secret
crc config set network-mode user
if [ -n "${{ inputs['cpus'] }}" ]; then
echo "Using cpus: ${{ inputs['cpus'] }}"
crc config set cpus ${{ inputs['cpus'] }}
fi
if [ -n "${{ inputs['memory'] }}" ]; then
echo "Using memory: ${{ inputs['memory'] }}"
crc config set memory ${{ inputs['memory'] }}
fi
if [ -n "${{ inputs['disk'] }}" ]; then
echo "Using disk: ${{ inputs['disk'] }}"
crc config set disk-size ${{ inputs['disk'] }}
fi
- name: Setup and Start the crc
shell: bash
run: |
Expand Down
Loading