From 661dfbb0d48fc14a152b11c070cebda6d6681a29 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 20 Aug 2023 17:56:43 +0100 Subject: [PATCH] Improves syntax for GITHUB_OUTPUT logic (GH-6) --- .github/workflows/compile.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index cb0b2a9..ec90ab9 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -26,16 +26,16 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set output with list of files - env: - GITHUB_OUTPUT: test id: get-files run: | import glob, json, os - files = glob.glob("**/*.mq?") - os.environ["GITHUB_OUTPUT"] = "filelist={}".format(json.dumps(files)) + file = os.environ["GITHUB_OUTPUT"] + filelist = "filelist={}".format(json.dumps(glob.glob("**/*.mq?"))) + with open(file, "a") as fd: + fd.write(filelist) shell: python - name: Display outputs - run: echo ${{ toJson(steps.get-files.outputs) }} + run: echo "${{ toJson(steps.get-files.outputs) }}" Compile: defaults: run: