Skip to content

Commit

Permalink
Run danger on forked PR
Browse files Browse the repository at this point in the history
  • Loading branch information
manicmaniac committed Nov 30, 2024
1 parent a239b9d commit 2f04b3f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
name: Lint
on: pull_request
name: danger
on: pull_request_target
jobs:
lint:
runs-on: ubuntu-22.04
danger:
runs-on: ubuntu-latest
permissions:
pull-requests: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- run: bundle exec danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
path: default
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
path: topic
set-safe-directory: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: default
- run: bundle exec danger --dangerfile=../default/Dangerfile
working-directory: topic
env:
BUNDLE_GEMFILE: ../default/Gemfile
DANGER_DO_NOT_POST_INVALID_DANGERFILE_ERROR: ''
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Test
name: test
on: push
jobs:
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby-version }}
strategy:
matrix:
Expand Down

0 comments on commit 2f04b3f

Please sign in to comment.