Bump pnpm from 9.7.1 to 9.12.3 #50
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: Auto Merge Dependabot PRs | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
jobs: | |
auto-merge: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js (if your project uses Node.js) | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' # Or the version your project uses | |
- name: Install dependencies | |
run: npm install # Adapt this step to your project's dependency manager | |
- name: Run tests | |
run: npm test # Replace with your test command | |
- name: Merge Dependabot PR | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const pr = context.payload.pull_request; | |
if (pr.user.login === 'dependabot[bot]' && pr.state === 'open' && pr.mergeable) { | |
const merge = await github.rest.pulls.merge({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: pr.number, | |
}); | |
console.log('PR merged:', merge.data.merged); | |
} else { | |
console.log('PR not merged. Conditions not met.'); | |
} |