-
Notifications
You must be signed in to change notification settings - Fork 74
28 lines (25 loc) · 1.1 KB
/
get-python-versions.yml
File metadata and controls
28 lines (25 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Get Python versions
on:
workflow_call:
outputs:
python-versions:
value: ${{ jobs.get-python-versions.outputs.python-versions }}
earliest-python-version:
value: ${{ jobs.get-python-versions.outputs.earliest-python-version }}
latest-python-version:
value: ${{ jobs.get-python-versions.outputs.latest-python-version }}
jobs:
get-python-versions:
runs-on: ubuntu-latest
outputs:
python-versions: ${{ steps.extract-versions.outputs.python-versions }}
earliest-python-version: ${{ steps.extract-versions.outputs.earliest-python-version }}
latest-python-version: ${{ steps.extract-versions.outputs.latest-python-version }}
steps:
- id: extract-versions
run: |
python_versions='[ "3.11", "3.12", "3.13" ]'
echo "python-versions=${python_versions}" >> $GITHUB_OUTPUT
echo "earliest-python-version=$(echo "${python_versions}" | jq --raw-output '.[0]')" >> $GITHUB_OUTPUT
echo "latest-python-version=$(echo "${python_versions}" | jq --raw-output '.[-1]')" >> $GITHUB_OUTPUT
- run: exit 0