Skip to content

Commit

Permalink
Simply abort if blocker is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed May 31, 2024
1 parent 64239cf commit 14cf44d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Merge dependabot PRs automatically
on:
pull_request_target:
paths:
- '**/*'
- '!rbs.gemspec'
- '!Gemfile'
- '!steep/Gemfile'
on: pull_request_target

permissions:
pull-requests: write
contents: write

env:
blocker_files: rbs.gemspec Gemfile steep/Gemfile

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Hello
run: echo Hello world
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Abort if blocker files are changed
run: git diff --exit-code ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} ${{ env.blocker_files }}
- name: Enable auto-merge for Dependabot PRs
if: ${{ github.actor == 'dependabot[bot]' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
Expand Down

0 comments on commit 14cf44d

Please sign in to comment.