Bump rspec-rails from 6.1.3 to 7.1.0 #238
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 automations | |
on: pull_request | |
jobs: | |
dependabot: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.pull_request.user.login, 'dependabot') | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: checkout PR branch | |
# set upstream for other gh commands | |
run: gh pr checkout ${{github.event.pull_request.number}} | |
- name: Fetch PR metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v2 | |
- name: Approve PR | |
run: | | |
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then | |
gh pr review --approve | |
else | |
echo "PR already approved" | |
fi | |
- name: Enable auto-merge | |
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 | |
permissions: | |
contents: write | |
pull-requests: write |