Skip to content

Commit 446992f

Browse files
committed
Add mem/cpu/disk-size option to action
1 parent e07f58e commit 446992f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/crc-action.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ jobs:
1818

1919
- name: CRC Action
2020
uses: ./
21-
21+
with:
22+
cpus: 4
23+
memory: 6098
24+
disk: 40
25+

action.yml

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ inputs:
99
description: 'preset to use for CRC microshift/okd/openshift (default microshift).'
1010
required: true
1111
default: 'microshift'
12+
cpus:
13+
description: 'number of cpu consume by crc instance'
14+
required: false
15+
memory:
16+
description: 'memory in MiB consume by crc instance'
17+
required: false
18+
disk:
19+
description: 'disk size consumed by crc instance'
20+
required: false
1221
runs:
1322
using: 'composite'
1423
steps:
@@ -64,6 +73,15 @@ runs:
6473
crc config set preset ${PRESET}
6574
crc config set pull-secret-file pull-secret
6675
crc config set network-mode user
76+
if [ -n "${{ inputs['cpus'] }}" ]; then
77+
crc config set cpus ${{ inputs['cpus'] }}
78+
fi
79+
if [ -n "${{ inputs['memory'] }}" ]; then
80+
crc config set memory ${{ inputs['memory'] }}
81+
fi
82+
if [ -n "${{ inputs['disk'] }}" ]; then
83+
crc config set disk-size ${{ inputs['disk'] }}
84+
fi
6785
- name: Setup and Start the crc
6886
shell: bash
6987
run: |

0 commit comments

Comments
 (0)