Skip to content

Commit

Permalink
Improves syntax for GITHUB_OUTPUT logic (GH-6)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Aug 20, 2023
1 parent a84f6e9 commit 40e807b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ jobs:
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) }}
Expand Down

0 comments on commit 40e807b

Please sign in to comment.