From 6b9596d4b2e77f66abcb7545a58f30d57915a7fe Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 7 Oct 2023 08:51:27 -0700 Subject: [PATCH] Try pulling python versions from a json file --- .github/workflows/main.yml | 19 +++++++++++++++---- .python-versions.json | 4 ++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 .python-versions.json diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 079730d..580cca5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,14 +2,24 @@ name: OctoDNS on: [pull_request] jobs: + config: + runs-on: ubuntu-latest + outputs: + json: ${{ steps.load.outputs.json }} + steps: + - id: load + run: | + JSON=$(cat ./.python-versions.json) + echo "::set-output name=json::${JSON}" ci: + needs: config runs-on: ubuntu-latest strategy: fail-fast: false matrix: - # Defined in an org level variable, based on dates in - # https://devguide.python.org/versions/#versions - python-version: ${{fromJson(vars.PYTHON_VERSIONS_ACTIVE)}} + # Defined in a file that resides in the top level of octodns/octodns, + # based on dates in https://devguide.python.org/versions/#versions + python-version: ${{ fromJson(needs.config.outputs.json).python_versions_active }} steps: - uses: actions/checkout@v4 - name: Setup python @@ -42,7 +52,8 @@ jobs: - name: Setup python uses: actions/setup-python@v4 with: - python-version: ${{ vars.PYTHON_VERSION_CURRENT }} + # Most recent release from https://devguide.python.org/versions/#versions + python-version: ${{ fromJson(needs.config.outputs.json).python_version_current }} architecture: x64 - name: CI setup.py run: | diff --git a/.python-versions.json b/.python-versions.json new file mode 100644 index 0000000..0e8eac4 --- /dev/null +++ b/.python-versions.json @@ -0,0 +1,4 @@ +{ + "python_version_current": "3.11", + "python_versions_active": ["3.8", "3.9", "3.10", "3.11"] +}