-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
b6288c5
commit 8631925
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |