Skip to content

Commit

Permalink
update deprecated set-output (#2675)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Dec 13, 2023
1 parent f1b2334 commit 5ffbaf9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/scripts/docker_setup_matrix.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import sys
import inspect
import os

branch = sys.argv[1] if len(sys.argv) > 1 else ''

if branch.__contains__("release-"):
chain, version = inspect.get_chain_and_version(branch)
print("::set-output name=matrix::{\"network\": [\"" + chain + "\"]}")
print("::set-output name=version::" + version + "")
with open(os.getenv("GITHUB_OUTPUT"), "a") as file:
matrix = "{\"network\": [\"" + chain + "\"]}"
file.write(f"matrix={matrix}\n")
file.write(f"version={version}\n")

else:
print("::set-output name=matrix::{\"network\": [\"mandala\", \"karura\", \"acala\"]}")
with open(os.getenv("GITHUB_OUTPUT"), "a") as file:
matrix = "{\"network\": [\"mandala\", \"karura\", \"acala\"]}"
file.write(f"matrix={matrix}\n")

0 comments on commit 5ffbaf9

Please sign in to comment.