From 05558f0de408250b33dadd7cb5f8b52ad6c4c291 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:23:51 +0100 Subject: [PATCH] set-meta-releases: output whole dict of branch info --- .github/workflows/test.yml | 11 ++++++++--- set-meta-releases/action.yml | 16 +++++++++++----- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acdda36..f4ef9a8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -155,6 +155,11 @@ jobs: shell: python run: | import json - meta_releases = json.loads('${{ steps.test-set-meta-releases.outputs.meta-releases }}') - assert isinstance(meta_releases, list) - assert len(meta_releases) > 0 + + meta_releases_list = json.loads('${{ steps.test-set-meta-releases.outputs.meta-releases }}') + assert isinstance(meta_releases_list, list) + assert len(meta_releases_list) > 0 + + meta_releases_dict = json.loads('${{ steps.test-set-meta-releases.outputs.meta-releases-dict }}') + assert isinstance(meta_releases_dict, dict) + assert len(meta_releases_dict) > 0 diff --git a/set-meta-releases/action.yml b/set-meta-releases/action.yml index c640cb1..74c0d49 100644 --- a/set-meta-releases/action.yml +++ b/set-meta-releases/action.yml @@ -7,8 +7,11 @@ description: | outputs: meta-releases: - description: 'JSON list of meta release identifiers' - value: ${{ steps.set-meta-releases.outputs.meta-releases }} + description: JSON list of meta release identifiers + value: ${{ steps.set-meta-releases.outputs.list }} + meta-releases-dict: + description: JSON dictionary of branches for each meta release + value: ${{ steps.set-meta-releases.outputs.dict }} runs: using: composite @@ -32,7 +35,10 @@ runs: with open('branches.json', 'r') as jsonfile: branches = json.load(jsonfile) print( - 'meta-releases=' - + json.dumps(list(branches['meta_releases'].keys())), - file=outputsfile, + f"list={json.dumps(list(branches['meta_releases'].keys()))}", + file=outputsfile + ) + print( + f"dict={json.dumps(branches['meta_releases'])}", + file=outputsfile )