Skip to content

Commit

Permalink
[CI] Fix comment trigger workflows for PRs made from forks [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Mar 24, 2023
1 parent 159232b commit 925f6d3
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/comment_trigger_benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run benchmarks from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand All @@ -23,7 +25,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/comment_trigger_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
# ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head

- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run ITensorGaussianMPS tests from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -35,7 +37,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/comment_trigger_test_itensorglmakie.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run ITensorGLMakie tests from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -35,7 +37,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/comment_trigger_test_itensors_mps.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run ITensors mps tests from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -35,7 +37,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run ITensorUnicodePlots tests from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -35,7 +37,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Run ITensorVisualizationBase tests from comment trigger

# https://dev.to/zirkelc/trigger-github-workflow-for-comment-on-pull-request-45l2

on:
issue_comment:
types: [created]
Expand Down Expand Up @@ -35,7 +37,8 @@ jobs:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
ref: refs/pull/${{ github.event.issue.number }}/head
- name: Setup Node.js 16
uses: actions/setup-node@v3
with:
Expand Down

0 comments on commit 925f6d3

Please sign in to comment.