From 73609ef84fe379cb242512a135e6a319bdd39b37 Mon Sep 17 00:00:00 2001 From: Min RK Date: Thu, 9 Jun 2022 09:11:24 +0200 Subject: [PATCH] use setup-python v4 python-version-file to set python version in a single place --- .github/workflows/cd.yml | 8 ++++---- .github/workflows/test-helm-template.yaml | 2 ++ .github/workflows/test-yamllint.yml | 2 ++ .python-version | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .python-version diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 84a655b8e..e186d683f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -94,11 +94,11 @@ jobs: with: fetch-depth: 0 - - name: "Stage 0: Setup Python 3.8" + - name: "Stage 0: Setup Python" uses: actions/setup-python@v4 id: setup-python with: - python-version: "3.8" + python-version-file: ".python-version" # Action Repo: https://github.com/actions/cache - name: "Stage 0: Cache pip dependencies" @@ -221,11 +221,11 @@ jobs: with: fetch-depth: 0 - - name: "Stage 0: Setup Python 3.8" + - name: "Stage 0: Setup Python" uses: actions/setup-python@v4 id: setup-python with: - python-version: "3.8" + python-version-file: ".python-version" # Action Repo: https://github.com/actions/cache - name: "Stage 0: Cache pip dependencies" diff --git a/.github/workflows/test-helm-template.yaml b/.github/workflows/test-helm-template.yaml index e4849dccd..7a1866313 100644 --- a/.github/workflows/test-helm-template.yaml +++ b/.github/workflows/test-helm-template.yaml @@ -53,6 +53,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + with: + python-version-file: ".python-version" - run: helm dependency update ./mybinder diff --git a/.github/workflows/test-yamllint.yml b/.github/workflows/test-yamllint.yml index b251e981c..7f2d07b27 100644 --- a/.github/workflows/test-yamllint.yml +++ b/.github/workflows/test-yamllint.yml @@ -27,6 +27,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 + with: + python-version-file: ".python-version" - run: pip install yamllint diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..c8cfe3959 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.10