build(deps): bump actions/upload-artifact from 4.6.2 to 7.0.1 #10
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: Classify Dependabot Updates | |
| on: | |
| pull_request: | |
| branches: [master] | |
| types: [opened, reopened, synchronize] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| classify: | |
| if: github.event.pull_request.user.login == 'dependabot[bot]' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Read Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3 | |
| with: | |
| github-token: ${{ github.token }} | |
| - name: Write immutable policy evidence | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| PR_BASE_REF: ${{ github.event.pull_request.base.ref }} | |
| UPDATE_TYPE: ${{ steps.metadata.outputs.update-type }} | |
| DEPENDENCY_NAMES: ${{ steps.metadata.outputs.dependency-names }} | |
| MAINTAINER_CHANGES: ${{ steps.metadata.outputs.maintainer-changes }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| policy_dir="$RUNNER_TEMP/dependabot-policy" | |
| mkdir -p "$policy_dir" | |
| jq -n \ | |
| --arg pr_number "$PR_NUMBER" \ | |
| --arg head_sha "$PR_HEAD_SHA" \ | |
| --arg base_ref "$PR_BASE_REF" \ | |
| --arg update_type "$UPDATE_TYPE" \ | |
| --arg dependency_names "$DEPENDENCY_NAMES" \ | |
| --arg maintainer_changes "$MAINTAINER_CHANGES" \ | |
| '{ | |
| pr_number: ($pr_number | tonumber), | |
| head_sha: $head_sha, | |
| base_ref: $base_ref, | |
| update_type: $update_type, | |
| dependency_names: $dependency_names, | |
| maintainer_changes: ($maintainer_changes == "true") | |
| }' > "$policy_dir/policy.json" | |
| - name: Upload policy evidence | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: dependabot-policy-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} | |
| path: ${{ runner.temp }}/dependabot-policy/policy.json | |
| if-no-files-found: error | |
| retention-days: 1 |