Skip to content

Commit

Permalink
set meta release action
Browse files Browse the repository at this point in the history
oliver-sanders committed Apr 11, 2023
1 parent b6288c5 commit 8631925
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions set-meta-releases/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Get Meta Releases
description: |
Fetch the list of active meta releases.
The meta releases will be made available as a JSON list in the output
`meta-releases`.
outputs:
meta-releases:
description: 'JSON list of meta release identifiers'
value: ${{ steps.set-meta-releases.outputs.meta-releases }}

runs:
using: composite
steps:
- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: fetch branch file
shell: bash
run: |
wget https://raw.githubusercontent.com/cylc/cylc-admin/master/docs/status/branches.json
- id: set-meta-releases
shell: python
run: |
import json
import os
with open(os.environ['GITHUB_OUTPUT'], 'w+') as outputsfile:
with open('branches.json', 'r') as jsonfile:
branches = json.load(jsonfile)
print(
'meta-releases='
+ json.dumps(list(branches['meta_releases'].keys())),
file=outputsfile,
)

0 comments on commit 8631925

Please sign in to comment.