From 779c68ad6e16a3d305b0f1aaee838b1a7c9ec4dd Mon Sep 17 00:00:00 2001 From: Pierre Gimalac Date: Fri, 13 Dec 2024 15:19:21 +0100 Subject: [PATCH] chore: update python version used in workflows to the one of the repo --- .github/workflows/buildimages-update.yml | 3 +-- .github/workflows/chase_release_managers.yml | 2 +- .github/workflows/code_review_complexity.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/collector-generate-and-update.yml | 10 ++-------- .github/workflows/create_rc_pr.yml | 4 ++-- .github/workflows/create_release_schedule.yml | 2 +- .github/workflows/cws-btfhub-sync.yml | 4 ++-- .github/workflows/docs-dev.yml | 2 +- .github/workflows/external-contributor.yml | 2 +- .github/workflows/go_mod_tidy.yml | 2 +- .github/workflows/label-analysis.yml | 8 ++++---- .github/workflows/report-merged-pr.yml | 2 +- 13 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/workflows/buildimages-update.yml b/.github/workflows/buildimages-update.yml index 1138e8557d011..da659fe32e8ff 100644 --- a/.github/workflows/buildimages-update.yml +++ b/.github/workflows/buildimages-update.yml @@ -62,8 +62,7 @@ jobs: - name: Setup Python and pip uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - # use Python < 3.12 so that distutil is still available by default - python-version: 3.11 + python-version-file: .python-version cache: "pip" - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 diff --git a/.github/workflows/chase_release_managers.yml b/.github/workflows/chase_release_managers.yml index 436217659ae48..45f993f82b18f 100644 --- a/.github/workflows/chase_release_managers.yml +++ b/.github/workflows/chase_release_managers.yml @@ -22,7 +22,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install Python dependencies run: | diff --git a/.github/workflows/code_review_complexity.yml b/.github/workflows/code_review_complexity.yml index 8c26254f6c626..e8156d7f547f0 100644 --- a/.github/workflows/code_review_complexity.yml +++ b/.github/workflows/code_review_complexity.yml @@ -27,7 +27,7 @@ jobs: - name: Setup python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.12 + python-version-file: .python-version cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d6886960d2396..9e98ea3f28ad9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -31,7 +31,7 @@ jobs: - name: Setup Python3 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: "3.12.6" + python-version-file: .python-version cache: "pip" - run: pip3 install -r requirements.txt diff --git a/.github/workflows/collector-generate-and-update.yml b/.github/workflows/collector-generate-and-update.yml index 275f6fbbcf410..491a703b300a8 100644 --- a/.github/workflows/collector-generate-and-update.yml +++ b/.github/workflows/collector-generate-and-update.yml @@ -14,22 +14,16 @@ jobs: - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - name: Read tool versions - id: tool-versions - run: | - echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV - echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - name: Set up Python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: ${{ env.PYTHON_VERSION }} + python-version-file: .python-version cache: 'pip' - name: Set up Go uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: .go-version - name: Install Dependencies run: | diff --git a/.github/workflows/create_rc_pr.yml b/.github/workflows/create_rc_pr.yml index 4522ddd4100a2..81ff5c7196742 100644 --- a/.github/workflows/create_rc_pr.yml +++ b/.github/workflows/create_rc_pr.yml @@ -27,7 +27,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install Python dependencies @@ -67,7 +67,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install Python dependencies diff --git a/.github/workflows/create_release_schedule.yml b/.github/workflows/create_release_schedule.yml index f8dc006160e3c..03aa04f447d28 100644 --- a/.github/workflows/create_release_schedule.yml +++ b/.github/workflows/create_release_schedule.yml @@ -27,7 +27,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install Python dependencies run: | diff --git a/.github/workflows/cws-btfhub-sync.yml b/.github/workflows/cws-btfhub-sync.yml index 0a61cd6d38c0c..71720308b343c 100644 --- a/.github/workflows/cws-btfhub-sync.yml +++ b/.github/workflows/cws-btfhub-sync.yml @@ -68,7 +68,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' - run: pip install -r requirements.txt @@ -117,7 +117,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' - run: pip install -r requirements.txt diff --git a/.github/workflows/docs-dev.yml b/.github/workflows/docs-dev.yml index 2f0cc36c01ce8..5d3a91eb80fb0 100644 --- a/.github/workflows/docs-dev.yml +++ b/.github/workflows/docs-dev.yml @@ -34,7 +34,7 @@ jobs: - name: Set up Python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: '3.12' + python-version-file: .python-version - name: Install dependencies run: pip install -r tasks/requirements.txt diff --git a/.github/workflows/external-contributor.yml b/.github/workflows/external-contributor.yml index f0beb805c2a50..913d87d1ef7ca 100644 --- a/.github/workflows/external-contributor.yml +++ b/.github/workflows/external-contributor.yml @@ -25,7 +25,7 @@ jobs: - name: Setup python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies diff --git a/.github/workflows/go_mod_tidy.yml b/.github/workflows/go_mod_tidy.yml index e48d806c9dce9..14801b766edb3 100644 --- a/.github/workflows/go_mod_tidy.yml +++ b/.github/workflows/go_mod_tidy.yml @@ -34,7 +34,7 @@ jobs: - name: Install python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install python requirements.txt run: python3 -m pip install -r requirements.txt diff --git a/.github/workflows/label-analysis.yml b/.github/workflows/label-analysis.yml index ec53d5a695fed..29b051c6da640 100644 --- a/.github/workflows/label-analysis.yml +++ b/.github/workflows/label-analysis.yml @@ -29,7 +29,7 @@ jobs: - name: Setup python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies @@ -50,7 +50,7 @@ jobs: - name: Setup python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies @@ -109,7 +109,7 @@ jobs: - name: Setup Python3 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: "3.12.6" + python-version-file: .python-version cache: "pip" cache-dependency-path: '**/requirements*.txt' - name: Install python dependencies @@ -131,7 +131,7 @@ jobs: - name: Setup python uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: 'pip' cache-dependency-path: '**/requirements*.txt' - name: Install dependencies diff --git a/.github/workflows/report-merged-pr.yml b/.github/workflows/report-merged-pr.yml index feefb3c5446bd..0119e9a538469 100644 --- a/.github/workflows/report-merged-pr.yml +++ b/.github/workflows/report-merged-pr.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Python3 uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: "3.12.6" + python-version-file: .python-version cache: "pip" cache-dependency-path: '**/requirements*.txt'