diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2f7704d9e..0ddf35f1c 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -16,6 +16,9 @@ name: Python checks +permissions: + contents: read + on: pull_request: @@ -25,12 +28,13 @@ jobs: outputs: any_changed: ${{ steps.changed-files.outputs.any_changed }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: fetch-depth: 0 + persist-credentials: false - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v45 + uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6 with: files: | python/** @@ -45,7 +49,7 @@ jobs: contents: write pull-requests: write steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: # Use the PR head ref to allow pushing back to the branch ref: ${{ github.head_ref }} @@ -53,7 +57,7 @@ jobs: token: ${{ secrets.RELEASE_PLEASE_TOKEN || github.token }} - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: enable-cache: true @@ -126,10 +130,12 @@ jobs: fail-fast: false steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + persist-credentials: false - name: Set up Go - uses: actions/setup-go@v6 + uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6 with: go-version: stable @@ -143,7 +149,7 @@ jobs: python-version: pypy3.11-v7.3.23 - name: Install uv and setup Python version - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 with: enable-cache: true python-version: ${{ matrix.python-version }}