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 661dfbb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 661dfbb

Please sign in to comment.