Refactored JS Action logic to print fibonacci numbers
Test / test (push) Successful in 10s

This commit is contained in:
2023-07-27 21:05:47 +02:00
parent 8de2a81f3d
commit 09232229b4
+8 -2
View File
@@ -6,10 +6,16 @@ function run() {
core.notice('Hello from a custom JS Action'); core.notice('Hello from a custom JS Action');
// Get Action Input Values // Get Action Input Values
var input_iterations = parseInt(core.getInput('iterations'));
// Process // Process
var currentNumber = 0;
var step = 1;
for (var i = 0; i < input_iterations; i++) {
core.notice(currentNumber);
currentNumber = currentNumber + step;
step = currentNumber;
}
// Produce Action Output // Produce Action Output