Added Custom Docker Action which prints fibonacci
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
|
||||
def run():
|
||||
input_iterations = os.environ['INPUT_ITERATIONS']
|
||||
|
||||
current_number = 1
|
||||
last_number = 0
|
||||
|
||||
for _ in range(input_iterations):
|
||||
print(current_number)
|
||||
temp = current_number
|
||||
current_number = current_number + last_number
|
||||
last_number = temp
|
||||
|
||||
with open(os.environ['GITHUB_OUTPUT'], 'a') as gh_output:
|
||||
print(f'lastNumber={last_number}', file=gh_output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run()
|
||||
Reference in New Issue
Block a user