[nrf noup] ci: prevent PRs from installing python pkgs #9941
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manifest Target | |
| on: | |
| pull_request_target: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| manifest-check: | |
| runs-on: ubuntu-24.04 | |
| name: Manifest Check | |
| outputs: | |
| manifest-result: ${{ steps.manifest.outputs.result }} | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: zephyrproject/zephyr | |
| ref: ${{ github.event.pull_request.base.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: 3.12 | |
| cache: pip | |
| cache-dependency-path: scripts/requirements-actions.txt | |
| - name: Install Python packages | |
| run: | | |
| cd zephyrproject/zephyr | |
| pip install -r scripts/requirements-actions.txt --require-hashes | |
| - name: Checkout the code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| path: zephyrproject/zephyr | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: west setup | |
| env: | |
| BASE_REF: ${{ github.base_ref }} | |
| working-directory: zephyrproject/zephyr | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Your Name" | |
| west init -l . || true | |
| - name: Manifest | |
| id: manifest | |
| uses: zephyrproject-rtos/action-manifest@1729cded3fc798cf0de4a789c596dcb9c40eb14c # v1.9.1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manifest-path: 'west.yml' | |
| checkout-path: 'zephyrproject/zephyr' | |
| use-tree-checkout: 'true' | |
| check-impostor-commits: 'true' | |
| label-prefix: 'manifest-' | |
| verbosity-level: '1' | |
| labels: 'manifest' | |
| dnm-labels: 'DNM (manifest)' | |
| blobs-added-labels: 'Binary Blobs Added' | |
| blobs-modified-labels: 'Binary Blobs Modified' | |
| apply-labels: | |
| runs-on: ubuntu-24.04 | |
| needs: manifest-check | |
| permissions: | |
| pull-requests: write # to create/update pull request comments and labels | |
| name: Apply Labels and Comments | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Process manifest results | |
| run: | | |
| echo "Manifest check completed with result: ${{ needs.manifest-check.outputs.manifest-result }}" | |
| # This job can now add labels and comments based on the manifest check results | |
| # The actual logic would depend on what the manifest action outputs |