build(deps): bump actions/checkout from 6 to 7 #110
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: Dependabot Auto-Merge | |
| on: pull_request | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| dependabot: | |
| runs-on: ubuntu-latest | |
| if: github.actor == 'dependabot[bot]' | |
| steps: | |
| - name: Dependabot metadata | |
| id: metadata | |
| uses: dependabot/fetch-metadata@v3 | |
| with: | |
| github-token: '${{ secrets.GITHUB_TOKEN }}' | |
| - name: Checkout PR | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| uses: actions/checkout@v7 | |
| with: | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup pnpm | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| - name: Install dependencies | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| run: pnpm install --frozen-lockfile | |
| - name: Rebuild dist/ | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| run: pnpm bundle | |
| - name: Check for dist/ changes | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' | |
| id: dist-check | |
| run: | | |
| if git diff --quiet dist/; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit updated dist/ | |
| if: steps.metadata.outputs.dependency-type == 'direct:production' && steps.dist-check.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add dist/ | |
| git commit -m "build: regenerate dist/ with updated dependencies" | |
| git push | |
| - name: Enable auto-merge for patch updates | |
| if: 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 }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |