Stop using floating Python 3.x in docs and label_pr CI (#16753)

* Stop using floating Python 3.x in docs and label_pr CI

The python-version: '3.x' specifier resolved to Python 3.15.0 on newer
runner images, causing rpds-py to fail to build (no pre-built wheel).
Removing the override lets the setup-python composite action derive the
version from the Makefile, consistent with the rest of CI.


* Fix SonarCloud security findings in docs and label_pr workflows

Pin pip dependencies with --only-binary :all: to prevent execution of
setup scripts, scope write permissions to job level instead of workflow
level, and use full commit SHA for third-party action.


* fix yaml syntax

* update yaml syntax so all run is recongnized correctly

* Add least-privilege permissions to docs workflow


* Disable credential persistence in docs workflow checkout

Prevents tox and dependency code from accessing the GitHub token
stored in .git/config.

Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jake Jackson
2026-10-23 13:28:24 +00:00
committed by GitHub
parent b2a3c87b46
commit e9ad241416
2 changed files with 12 additions and 12 deletions
+4 -3
View File
@@ -7,17 +7,18 @@ jobs:
name: docsite test build name: docsite test build
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
permissions:
contents: read
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
persist-credentials: false
show-progress: false show-progress: false
- uses: ./.github/actions/setup-python - uses: ./.github/actions/setup-python
with:
python-version: '3.x'
- name: install tox - name: install tox
run: pip install tox run: 'pip install --only-binary :all: tox==4.67.1'
- name: Assure docs can be built - name: Assure docs can be built
run: tox -e docs run: tox -e docs
+8 -9
View File
@@ -7,16 +7,14 @@ on:
- reopened - reopened
- synchronize - synchronize
permissions:
contents: write # to determine modified files (actions/labeler)
pull-requests: write # to add labels to PRs (actions/labeler)
jobs: jobs:
triage: triage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
name: Label PR name: Label PR
permissions:
contents: read
pull-requests: write
steps: steps:
- name: Label PR - name: Label PR
uses: actions/labeler@v3 uses: actions/labeler@v3
@@ -28,19 +26,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
name: Label PR - Community name: Label PR - Community
permissions:
contents: read
pull-requests: write
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
show-progress: false show-progress: false
- uses: ./.github/actions/setup-python - uses: ./.github/actions/setup-python
with:
python-version: '3.x'
- name: Install python requests - name: Install python requests
run: pip install requests run: 'pip install --only-binary :all: requests==2.34.2'
- name: Check if user is a member of Ansible org - name: Check if user is a member of Ansible org
uses: jannekem/run-python-script-action@v1 uses: jannekem/run-python-script-action@9d8e2e0878d575fb6073277f38ce3f10ebf4f059 # v1
id: check_user id: check_user
with: with:
script: | script: |