fix(ci): restore read-all at workflow level for Scorecard verification #170
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
| # Copyright (c) Microsoft Corporation. Licensed under the MIT License. | |
| name: Auto-merge Dependabot PRs | |
| on: pull_request | |
| permissions: | |
| contents: read | |
| jobs: | |
| auto-merge: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0 | |
| id: metadata | |
| - name: Auto-approve patch and minor updates | |
| if: steps.metadata.outputs.update-type != 'version-update:semver-major' | |
| run: gh pr review --approve "$PR_URL" | |
| env: | |
| PR_URL: "${{ github.event.pull_request.html_url }}" | |
| GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| - name: Enable auto-merge for patch and minor | |
| if: steps.metadata.outputs.update-type != 'version-update:semver-major' | |
| run: gh pr merge --auto --squash "$PR_URL" | |
| env: | |
| PR_URL: "${{ github.event.pull_request.html_url }}" | |
| GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |