From dc6c5bb635b43e4a56a87c3fd96661ba81dc52b7 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 a480105bf17e8..a29c135183506 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 475068736efea..e5c1281d7f6b6 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 3f36b387e0f34..9ce2d5590370a 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 bc52cb502bdaf..589b02679c633 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 66fbf9462a168..081792d27610a 100644 --- a/.github/workflows/create_rc_pr.yml +++ b/.github/workflows/create_rc_pr.yml @@ -31,7 +31,7 @@ jobs: if: ${{ env.IS_AGENT6_RELEASE == 'false' }} uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: - python-version: 3.11 + python-version-file: .python-version cache: "pip" - name: Install Python dependencies @@ -76,7 +76,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 4b749ba3bdc97..598dde6c22c10 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 88f198f5b114d..366cd596697ed 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 59e803598f6cd..d84266b5c5908 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 03cf46fd03511..4878e02cf6b46 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 4cc1a55690e6f..9f471570c14ce 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 7c4345e2ec323..8dc2c1cef6804 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 879b5b7e13330..570205469fe4d 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'