docs: add instructions for setting up gitsign credential cache on Mac OS #162
Workflow file for this run
This file contains 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: Dependabot auto-merge | |
on: | |
pull_request: | |
permissions: read-all | |
jobs: | |
dependabot: | |
permissions: | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@c9c4182bf1b97f5224aee3906fd373f6b61b4526 # v1.6.0 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Approve a PR if not already approved | |
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }} | |
run: | | |
gh pr checkout "$PR_URL" # sets the upstream metadata for `gh pr status` | |
if [ "$(gh pr status --json reviews -q '[.currentBranch.reviews[]| select(type=="object" and has("state"))| .state | select(match("APPROVED"))] | unique | .[0]')" != "APPROVED" ]; | |
then gh pr review --approve "$PR_URL" | |
else echo "PR already approved, skipping additional approvals to minimize emails/notification noise."; | |
fi | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
- name: Enable auto-merge for Dependabot PRs | |
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }} | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |