Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow triggering pr-review from forked repo #296

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: CI

on: [push, pull_request]
on:
pull_request_target:
types:
- opened
- synchronize
- ready_for_review
- reopened
paths:
- "plugins.yaml"
branches:
- master

# For development, use the following instead:
# on: [pull_request]


# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
Expand Down Expand Up @@ -68,7 +82,6 @@ jobs:

preview:
# This job is triggered by (only) a PR.
if: github.event_name == 'pull_request'
needs: [test-webpage-build]
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -116,6 +129,4 @@ jobs:
umbrella-dir: pr-preview
action: auto
custom-url:
# preview will failed if the PR is from a forked repo
# should be fixed after https://github.com/aiidateam/aiida-registry/issues/272
if: (!github.event.pull_request.head.repo.fork)
token: ${{ secrets.BOT_COMMENT_TOKEN }} # use aiida-bot token to deploy the preview